Here's the question you clicked on:
pythagoras123
Peter and Jane take turns subtracting perfect squares from a given whole number and the person who subtracts the last number to get zero is the winner. If the whole number is 29, and Peter is the first player. what perfect number must he subtract in order for him to definitely win?
16 then Jane would have to subtract either 4 or 9, then jackpot for Peter
Er.. But Jane can subtract 1 and 16 also..
Yeah ... it seems that way.
29 = 25 + 4 = 16 + 9 + 4 but there's no other way. If Jane subtracts 1 ... then it would ruin game.
29= 16+1+9+1+1+1 Jane would then draw the last one
It might be best here to work in reverse. i.e. write down the outcome if, after your turn, Jane was left with 1, 2, 3, etc
you can then build up to a point where you can work out your best move
the other way seem to be 16+4+1+1+1+1+1+1+1+1+1 and 16+1+1+1+1+1+1+1+1+1+1+1+1+1 for Peter to win, I don't think peter will win if jane does not cooperate.
here is the table I worked out so far: after Peter moves, if he leaves: 1 => Jane wins 2 => Jane wins 3 => Peter wins 4 => Jane wins 5 => Jane wins 6 => Peter wins 7 => Jane wins 8 => Jane wins 9 => Jane wins 10 => Jane wins 11 => Peter wins 12 => Jane wins 13 => Peter wins so, as experimentX suggested, if Peter takes 16 first, that will leave 13 which means he would win.
it seems rather like game of odd - even