Finding H.C.F. by Listing Factors by Ronan Downes
Loading the math board and drawing, please wait…
This example demonstrates finding the Highest Common Factor (HCF) of two numbers by listing all their factors. It involves core math concepts like HCF, factorization, and set operations. The construction uses GeoGebra commands/objects such as Append, If, Intersection, and Zip. Suitable for middle school mathematics teaching to help students visually understand the concept and calculation method of HCF.
GeoGebra Commands & Parameters
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