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 :(