Finding least common multiples by prime factorization is not always correct?

67 Views Asked by At

I found out that the algorithm for finding LCM of N given numbers by prime factiorization (as on wikipedia) is not always correct. For example: $$ LCM(8, 21) = 2^3*7^1 = 8*7=56 $$ Which is obviously not true. Is there a rule saying that for some numbers this algorithm won't give correct answer? Or something else I'm not aware of?

I'm sorry for my poor english :(

1

There are 1 best solutions below

3
On

Hint: LCM is not $2^3\times 7$ but it is $2^3\times 3\times 7$.

You can also use the well known fact that LCM*HCF = Product of numbers. HCF of $8, 21$ is $1$. So, $LCM=8*21$