通过列举因数找最大公因数
几何画板及绘图内容加载中,请稍等……
①本范例演示通过列举两个数的所有因数来找出它们的最大公因数(HCF);②涉及的核心数学概念为最大公因数、因数分解、集合运算;③作图要点——从下方『构造摘要』提炼用到了 Append(追加元素)、If(条件判断)、Intersection(交集)、Zip(组合)等 GeoGebra 命令/对象;④适合初中数学教学,用于帮助学生直观理解最大公因数的概念和计算方法。
GeoGebra 命令及参数
Append("", Sequence[Text[i], i, 1, 100]) → listNumIf(SelectedIndex[listNum2] > 1, SelectedIndex[listNum2] - 1) → n2If(Defined[n2], Reverse[KeepIf[IsInteger[k], k, Sequence[n2 / i, i, 1, n2]]], {0}) → listFactor2If(SelectedIndex[listNum1] > 1, SelectedIndex[listNum1] - 1) → n1If(Defined[n1], Reverse[KeepIf[IsInteger[k], k, Sequence[n1 / i, i, 1, n1]]], {0}) → listFactor1Intersection(listFactor1, listFactor2) → listCFIf(listFactor1 ≟ {0} ∨ t1 ≟ 0, {0}, First[listFactor1, t1]) → listFactor1PartialIf(Length[listFactor1] ≤ 1, 1, Length[listFactor1]) → t1maxIf(Length[listFactor2] ≤ 1, 1, Length[listFactor2]) → t2maxZip(If[IndexOf[k, listCF] ≥ 1 ∧ box1, "\red{", ""] + (Text[k]) + (If[IndexOf[k, listCF] ≥ 1 ∧ box1, "}", ""]) + "\,,\,", k, listFactor1Partial) → listFactorText1If(listFactor2 ≟ {0} ∨ t2 ≟ 0, {0}, First[listFactor2, t2]) → listFactor2PartialZip(If[IndexOf[k, listCF] ≥ 1 ∧ box1, "\red{", ""] + (Text[k]) + (If[IndexOf[k, listCF] ≥ 1 ∧ box1, "}", ""]) + "\,,\,", k, listFactor2Partial) → listFactorText2If(listFactorText1 ≟ {}, " ", Sum[listFactorText1] + " ") → textSum1If(listFactorText2 ≟ {}, " ", Sum[listFactorText2] + " ") → textSum2