LCM by Listing Multiples

LCM by Listing Multiples
Loading the math board and drawing, please wait…
2020-07-26 18:04
This example demonstrates how to find the Least Common Multiple (LCM) of two natural numbers by listing their multiples. Core math concepts involved include natural numbers, multiples, and LCM. Construction highlights the use of GeoGebra commands like Append, If, Sequence, and objects such as box1, listNum, n1 to dynamically generate and highlight multiples. Suitable for middle school mathematics education to help students understand and calculate LCM.

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

AI Drawing Prompt Reference

Create a graphic for the least common multiple of two natural numbers. First, input two natural numbers and list their first 30 multiples. Then, find their least common multiple and highlight it in blue. Finally, compare these multiples with the least common multiple to find the common multiples and mark them in blue.
The prompt above was compiled from the original drawing commands and is for reference only.