nadontheway wrote:Thanks Stuart. I see your point but could you elaborate on the concept of LCM?
x= 5
6= 3*2
9=3*3
to get the LCM of x, 6 and 9, we pick 5 from x, 2 from 6 and 3*3 from 9 that gives us 90. Is it the way to proceed?
LCM stands for lowest common multiple.
The LCM of two (or more) numbers is the smallest number that's a multiple of both numbers. In other words, it's the smallest number that the other numbers all "go into".
One way to find the LCM is by using prime factors. The LCM of a set of numbers has to contain all the primes of the individual numbers in the set.
For example, if our numbers are:
5, 6 and 9
then our LCM will have to contain 5, 2&3 (from 6) and 3&3 (from 9).
If we were to multiply all of those primes together, we'd get:
5 * 2 * 3 * 3 * 3 = 270
Now, 270 is a common multiple of 5, 6 and 9, but it's not the LOWEST common multiple.
When two (or more) numbers in the set have prime factors in common, we don't need to duplicate those primes to generate the LCM.
In our example, both 6 and 9 have prime factors of 3, so we eliminate one of the 3s to get our LCM of 90.
(Note that we still need 2 3s, since 9 has two prime factors of 3 and if we were to eliminate one of those 9 would no longer be a factor of our number.)