is it true that if you make the 1st move on this game you always win?

Printable View

- 01-31-2005InvariantLoopEuclid's game.
is it true that if you make the 1st move on this game you always win?

- 01-31-2005pianorain
No. Consider 8 and 2.

- 01-31-2005InvariantLoop
im confused lol im playing the game and trying to figure out a pattern but theres always something that breaks the pattern. how come the game depends on the orignal two numbers and not who makes the first move?

edit: you can play the game here http://www.cut-the-knot.org/blue/EuclidAlg.shtml - 01-31-2005InvariantLoop
i think i figured out the pattern. tell me if this is true.

Code:`if in the original 2 numbers, the bigger number is odd, whoever makes the 1st move wins!.`

if in the original 2 numbers, the bigger number is even, whoever makes the 2nd move wins!

- 01-31-2005XSquared
The way to figure out who goes first is by calculating n/gcd(n,m) where n and m are the two numbers, n>m. If n/gcd(n,m) is odd, the 1st player will win. If it is even, then the 2nd player will win.