re: Project Euler #5 - Finding the Smallest Multiple VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hey Mary, let me help you understand this answer. But first. This problem as do most problems on Project Euler requires domain knowledge in Mathe...

I dont know how to do the quote format.. this is my first issue though: "A positive number that's divisible by 2,3,...,10 is 2*3*...*10 because 2,3,...,10 are all factors of that number." I don't understand how one came up with that conclusion and by divisible you mean without a remainder? Is it because you multiplied them all together that dividing by one of the numbers puts you in the same place you started before multiplying?

"But since 2 and 4 are factors of 8 it follows that 2, 4 and 8 will also be factors of 3*5*6*7*8*9*10." I have no idea how this "follows"; same with 3 and 5... esp. 5 because you remove 10 instead. Why didn't you remove 9 instead of 3? This is not confusing at all.

And why does "6 divide 5*7*8*9" but "7 does not divide 5*8*9"? Did you do the math to determine this or can this be explained without trial and error?

There are still assumptions in this solution, but thanks for trying to explain, though.

And I've already ordered that Math and Science book. Thank you.

Is it because you multiplied them all together that dividing by one of the numbers puts you in the same place you started before multiplying?

Yes.

I have no idea how this "follows".

3*5*6*7*8*9*10 = 3*5*6*7*(2*4)*9*10 => 2, 4 and 8 are factors.

If 10 = 2*5 then 2 and 5 are factors. So that's what I'm doing above.

Why didn't you remove 9 instead of 3?

If I removed 9 then 9 would no longer be a factor of what remains. There's no way to make a 9 with what remains.

And why does "6 divide 5*7*8*9"

Because we can take a 2 from 8 and a 3 from 9 to show that 6 is a factor, i.e. 5*7*8*9 = 5*7*4*(2*3)*3 = 5*7*4*6*3.

but "7 does not divide 5*8*9"

5*8*9 = 5*2*2*2*3*3, see no 7's :).

code of conduct - report abuse