Finding LCM by Listing Multiples

Finding LCM by Listing Multiples
Loading the math board and drawing, please wait…
2020-08-19 17:40
This example demonstrates how to find the least common multiple (LCM) of two natural numbers by listing their multiples. It involves concepts of natural numbers and sequences. Using GeoGebra commands such as Append, If, and Sequence, the process is dynamically illustrated. Suitable for high-grade elementary or junior high school students.

GeoGebra Commands & Parameters

  1. Append("", Sequence[Text[i], i, 1, 30]) → listNum
  2. If(SelectedIndex[listNum1] > 1, SelectedIndex[listNum1] - 1) → n1
  3. If(SelectedIndex[listNum2] > 1, SelectedIndex[listNum2] - 1) → n2
  4. If(n1 > 0 ∧ n2 > 0, LCM[n1, n2], 0) → a
  5. If(t2 ≥ 1, Sequence[(n2 * i), i, 1, t2], {0}) → listMultiple2
  6. If(t1 ≥ 1, Sequence[(n1 * i), i, 1, t1], {0}) → listMultiple1
  7. Sequence((i * a), i, 1, 30) → listCM
  8. If(listMultiple1 ≟ {0} ∨ t1 ≟ 0, {0}, First[listMultiple1, t1]) → listM1
  9. If(t1 > 0, Sequence[If[IndexOf[listM1(i), listCM] ≥ 1 ∧ box1, "\blue{\bold{", ""] + (Text[listM1(i)]) + (If[IndexOf[listM1(i), listCM] ≥ 1 ∧ box1, "}}", ""]) + "\,,\," + (If[i ≟ 10 ∨ i ≟ 20, "\\", ""]), i, 1, t1], {"0"}) → listMultiText1
  10. If(listMultiple2 ≟ {0} ∨ t2 ≟ 0, {0}, First[listMultiple2, t2]) → listM2
  11. If(t2 > 0, Sequence[If[IndexOf[listM2(i), listCM] ≥ 1 ∧ box1, "\blue{\bold{", ""] + (Text[listM2(i)]) + (If[IndexOf[listM2(i), listCM] ≥ 1 ∧ box1, "}}", ""]) + "\,,\," + (If[i ≟ 10 ∨ i ≟ 20, "\\", ""]), i, 1, t2], {"0"}) → listMultiText2
  12. If(listMultiText1 ≟ {"0"}, " ", Sum[listMultiText1]) → textSum1
  13. If(listMultiText2 ≟ {"0"}, " ", Sum[listMultiText2]) → textSum2
  14. If(t1 > 1, "the first " + t1 + " multiples", t1 ≟ 1, "the first multiple") → text1
  15. If(t2 > 1, "the first " + t2 + " multiples", t2 ≟ 1, "the first multiple") → text2