26.9k views
3 votes
The perfect square game is played as follows: player 1 says a positive integer, then

player 2 says a strictly smaller positive integer, and so on. The game ends when someone
says 1; that player wins if and only if the sum of all numbers said is a perfect square.
What is the sum of all n such that, if player 1 starts by saying n, player 1 has a winning
strategy?

User Kalpa
by
8.0k points

1 Answer

4 votes

Answer: the number can be 9

Explanation:

we want that

n + n - 1 + n-2 + .... + 2 + 1 = X

X must be a perfect square.

And the last number, 1, must be said by player 1, so n must be an odd number.

n + (n - 1) + (n -2) + ... + (n - n + 1) = n*n - (1 + 2 + 3 + .... + n)

and we know that:

(1 + 2 + 3 + 4 + ... + n) = n*(n + 1)/2

So we have:

x = n*n - n*(n + 1)/2 = n*n - n*n/2 - n/2 = n*n/2 - n/2 = n*(n + 1)/2

Now we want to find X such that is a perfect square and n must be an odd integer.

You can start giving different values for n until you reach a value of X that is a perfect square, for example, if you take n = 9, we have X = 36.

and 36 = 6*6

So if player 9, he will win always.

User Gavin Schulz
by
7.5k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.