Least Common Multiple
lcm(a, b) = a * b / gcd(a, b).
Decision · step 2 of 5Multiples, Powers, Pascal: lcm of 4 and 6
1 x 4 = 4. 4 / 6 leaves a remainder of 4, so keep going.
What you will see
Multiples of a and b marked on a number line; the first shared mark.
Cost
| Space | O(1) |
|---|
How you work with it here
play it through, step one change at a time, run it on your own input.
Screen readers: Numbers announce their value and role; each step announces the arithmetic performed.
Reduced motion: Values crossfade; no travelling digits.
Before this
Taught by the same lesson
Multiples, Powers, Pascal covers these too, in the same run.