Amy and Bob play the game. At the beginning, Amy writes down a positive integer on the board. Then the players take moves in turn, Bob moves first. On any move of his, Bob replaces the number $n$ on the blackboard with a number of the form $n-a^2$, where $a$ is a positive integer. On any move of hers, Amy replaces the number $n$ on the blackboard with a number of the form $n^k$, where $k$ is a positive integer. Bob wins if the number on the board becomes zero. Can Amy prevent Bob’s win? Maxim Didin, Russia
Problem
Source: RMM 2019
Tags: RMM, RMM 2019, number theory
23.02.2019 14:59
Clearly, Amy shall never chose an even $k$. Suppose that after a ceratin move of Bob the number $n$ is written on the table and let $n=X_0^2m$ for some $X_0$ and $m$, then at her next turn Amy will write a number of the form $X_0^{2(2t+1)}m^{2t+1}$, thus Bob can choose $b:=X_0^{2t+1}m^t$ and at his next turn he will be able to write a number of the form $X_1^2(m-1)$, implying that eventually a perfect square will appear on the board which guarantees Bob an Ez win.
23.02.2019 15:01
Sniped!
23.02.2019 15:06
Bob’s aim is to achieve a perfect square on board. Let $n = x.b^2$ after some moves where $x$ is the square-free part of $n$. If Amy plays, then the number is changed to $a^k.b^{2k}$ which has a square-free part less than the one before. If Bob plus, then he chooses $a = b$ which once again decreases the square-free part. Thus, the square-free part of $n$ strictly decreases. So, $n$ will become a perfect square after sometime. Thus, Bob wins.
23.02.2019 15:15
The best thing Amy can do is to choose $k=1$ every time and do nothing...
23.02.2019 15:42
Let $n$ be the initial number written on the board.From Lagrange's Theorem $n=a^2+b^2+c^2+d^2$. B choses $a^2$.Now A is writing a perfect square so we are done or A writes a number of the form $(b^2+c^2+d^2)T_1^2$.Now B choses $b^2T_1^2$.Again A is writing a perfect square or a number of the form $(c^2+d^2)T_2^2$.Now B choses $c^2T_2^2$ and the number left is a perfect square so B wins after A moves.
23.02.2019 15:44
Crimson. wrote: Let $n$ be the initial number written on the board.From Lagrange's Theorem $n=a^2+b^2+c^2+d^2$. B choses $a^2$.Not A is writing a perfect square so we are done or A writes a number of the form $(b^2+c^2+d^2)T_1^2$.Now B choses $b^2T_1^2$.Again A is writing a perfect square or a number of the form $(c^2+d^2)T_2^2$.Now B choses $c^2T_2^2$ and the number left is a perfect square so B wins after A moves. You're right, but using Lagrange's four squares theorem is sort of an overkill for this problem...
23.02.2019 23:53
I claim that the product of the prime divisors with odd powers must strictly decrease, so Bob can win. Let $n_1=T_1^2p_1p_2\dots p_i$. Then, Bob subtracts $T_1^2$, which means that Amy has $T_1^2(p_1p_2\dots p_i-1)$. She clearly exponentiates to an odd power, so then we end up with new $n_2=T_2^2q_1q_2\dots q_j$, where $q_1q_2\dots q_j<p_1p_2\dots p_i$, because the left hand side consists of prime factors of $p_1p_2\dots p_i-1$. This means that the product of the prime factors with odd power must be strictly decreasing, which means that it eventually must reach a perfect square, which means Bob wins.
24.02.2019 00:06
Amy must always use $k$ odd for her exponents, else she loses immediately. Note also that sign of $a$ is not important; Bob could flip it if necessary. Claim. Suppose Amy currently has a number of the form $jm^2$ on her turn. Bob could make it of the form $(j-1)k^2$ in the next move, for some $k \in \mathbb{N}$. Proof. Indeed, if Amy does $jm^2 \mapsto (jm^2)^{2s+1}$, Bob replies with $a=m(jm^2)^s$ so that Amy is left with $(j-1)\left(m(jm^2)^{s}\right)^2$, as claimed. $\blacksquare$ Now, say Amy has $j=v$ at the start, so she loses before Bob counts the number of vertices in p3.
11.07.2019 20:06
16.09.2020 10:51
We claim that Bob has a winning strategy.When n is a perfect square ,Bob wins immediately ,so n is not a perfect square. Define a square free number as follow;$60=2^2*15$ so 15 is a squarefree. Claim1)We want to use monovariants such that Bob will make all the squaree free equals to 1,and then he wins. Note that k can not be an even number(if it is even then Bob immediately wins). Lets take an example,if Amy chooses n=60 $n=2^2*15$,so Bob want to make 15->1, and save $2^2$,So we make 15 as small as possible ,so we have to take a=6 and we have $60-36=2^2*6$,so we have decreased from 15 to 6. Now amy takes $(2^2*6)^k$,let say k=3 and we see that it becomes $((2^3)*6)^2*6$,so the squarefree part is the same(which means Amy can not increase it and Bob for every move will decrease it ,untill it becomes equal to 1 and he wins) Let say $n=m^2*j$,then Bob makes the following move,$BOB->m^2*j-m^2*t,(where j<=t)$ and ($m^2*t$ is a perfect square) $m^2(j-t)$,(so we have decreases the number and saved $m^2$) $AMY->(m^2(j-t))^k=(m^k*(j-t)^{k-1})^2* (j-t)$.,So Amy can not increase $(j-t)$ (the square free part). After some moves ,$j-t$ will be decreased to 1 and Bob will win.
16.09.2020 17:52
Bob wins. We claim that Bob can force the squarefree part to be strictly decreasing, and note that he wins if the squarefree part is $1.$ Notice that on any move Alice cannot increase the squarefree part; it either stays the same if $k$ is odd or becomes $1$ is $k$ is even. Then if the number is $j^2k$ where $k$ is the squarefree part, Bob needs only choose $j^2.$
08.10.2020 04:51
This game is unfair: Bob always wins. There exist numbers $s, t$ for each positive integer $n$ such that $n=s^2\cdot t$ where $t$ does not have any factors that are perfect squares. Now, every time it is Bob's turn, he replaces $n$ with $n-s^2$. This decreases the value of $t$, but Amy can never increase $t$. Therefore, $t$ will eventually reach 0, and Bob will win, as desired.
08.10.2020 06:33
I present two solutions here : Solution 1 (using Lagrange's four square theorem) [Lagrange? Legendre? idk] : We see that every natural number cna be expressed as $a^2+b^2+c^2+d^2$ for integers $a, b, c, d$. We here assume that none of $a, b, c, d$ is $0$, as those cases can be handled similarly. This is because in the problen, Bob can subtract only positive integers. Crimson. wrote: Let $n$ be the initial number written on the board.From Lagrange's Theorem $n=a^2+b^2+c^2+d^2$. B choses $a^2$.Now A is writing a perfect square so we are done or A writes a number of the form $(b^2+c^2+d^2)T_1^2$.Now B choses $b^2T_1^2$.Again A is writing a perfect square or a number of the form $(c^2+d^2)T_2^2$.Now B choses $c^2T_2^2$ and the number left is a perfect square so B wins after A moves. This is why this solution isn't completely correct but fine, their main approach is perfect. We see that if $n = a^2+b^2+c^2+d^2$ for positive integers $a, b, c, d$, then Bob removes $a^2$. Then after Amy move, we have $n_2 = (b^2+c^2+d^2)^t(b^2+c^2+d^2)$, where $t$ is even since Amy always need to raise the exponent by an odd number to avoid letting Bob win. Here we remove $b^2(b^2+c^2+d^2)^t$. We see that repeating this algorithm gives Bob a handy dandy win. If $0 \in \{ a, b, c, d \}$, then we remove that number and continue in the same way. Solution 2 (same algorithm but without Lagrange's four square Theorem) If Amy has number of form $ab^2$, $a, b \in \mathbb{N}$. Then Bob removes $tb^2$, where $t = \left \lfloor \sqrt{a} \right \rfloor ^2$. We have a number of form $a_1b^2$. Now, see that if we decompose this number into square free part and square divisible part, Amy cannot increase the value of square free part, whereas Bob just selects a suitable multiple of the square divisible part, which means that at some part, the square free part reaches $1$, which means that the number is now a perfect square and Amy has lost to her inevitable fate. anantmudgal09 wrote: Amy must always use $k$ odd for her exponents, else she loses immediately. Note also that sign of $a$ is not important; Bob could flip it if necessary. Claim. Suppose Amy currently has a number of the form $jm^2$ on her turn. Bob could make it of the form $(j-1)k^2$ in the next move, for some $k \in \mathbb{N}$. Proof. Indeed, if Amy does $jm^2 \mapsto (jm^2)^{2s+1}$, Bob replies with $a=m(jm^2)^s$ so that Amy is left with $(j-1)\left(m(jm^2)^{s}\right)^2$, as claimed. $\blacksquare$ Now, say Amy has $j=v$ at the start, so she loses before Bob counts the number of vertices in p3. I am sorry but why is $a = m(jm^2)^s$ here a perfect square? Also, if Bob could always subtract odd powers then this problem would've been more interesting.
07.11.2020 11:48
math90 wrote: Amy and Bob play the game. At the beginning, Amy writes down a positive integer on the board. Then the players take moves in turn, Bob moves first. On any move of his, Bob replaces the number $n$ on the blackboard with a number of the form $n-a^2$, where $a$ is a positive integer. On any move of hers, Amy replaces the number $n$ on the blackboard with a number of the form $n^k$, where $k$ is a positive integer. Bob wins if the number on the board becomes zero. Can Amy prevent Bob’s win? Maxim Didin, Russia I claim that Amy can't prevent Bob from winning in any case, Clearly Amy cant chose an even $k$ otherwise she loses immediately.Let $N$ denote the current number on the board. Claim Bob can ensure $N$ is strictly decreasing Proof Let $N=T^2\cdot \text{rad(N)}$ then Bob can chose $a=T$ to get $N'=T^2\cdot (\text{rad}(N)-1)$.Suppose Amy raises $N'$ by $2k+1$,Thus we will get \begin{align*}(N')^{2k+1}&=(T^{2k+1}(\text{rad}(N)-1)^{k})^2\cdot (\text{rad}(N)-1) \\ &= (T'^2)\cdot (\text{rad}(N)-1)\end{align*}Using our Claim Bob can make $\text{rad}(n)=1$ at some point at which $N$ will be a square and so he wins.$\square$
08.11.2020 03:55
here is $3$ different solutions , found by me and my friends. . .
02.03.2021 16:13
The answer is no. First observe that if Amy ever chooses a square on the board, then Bob can win immediately. In particular Amy should never select an even $k$. Now suppose Amy picks $n=n_1$. By Lagrange's four-square theorem we know that we can write $n_1=a_1^2+b_1^2+c_1^2+d_1^2$, where all the $a_i$ are nonnegative. Suppose $a_1 \leq b_1 \leq c_1 \leq d_1$. Then Bob can pick $a=d_1$, after which the number will be $a_1^2+b_1^2+c_1^2=n_1'$. Now suppose Amy chooses $k=2r+1$ for some nonnegative integer $r$. Then we will end up with $(n_1')^{2r+1}$ which we will call $n_2$. This number can also be expressed as $(a_1n^r)^2+(b_1n^r)^2+(c_1n^r)^2$. Call this expression $a_2^2+b_2^2+c_2^2$, where we have $a_2=a_1n^r$ and the same for the others. Then Bob can pick $a=c_2$ and eliminate another square, after which we can similarly express the number on the board as the sum of two squares. Doing this again, the number becomes a square after Bob makes his move, after which it will stay a square and Bob can win.
18.03.2021 08:08
Solution with naman12, tigershark22, CantonMathGuy, kvedula2004, psyduck909, Marabot Discord Bot, Paradox Discord Bot, and Giuseppe Ludovico De la Grange Tournier(Joseph-Louis Lagrange). We claim no. Assume that the number on the board is $a^2 \cdot b$, where $b$ is squarefree. Then, observe that if Amy picks an even power, she instantly loses, and if Amy picks an odd power, then the new squarefree term for the new number is still simply $b$. By Lagrange's Four Square theorem, we can write $b = w^2 + x^2 + y^2 + z^2$. Every time, Bob kills a square, so he can win in at most $4$ moves.
18.03.2021 08:23
Wait so now discord bots can solve math problems?? @above
17.09.2021 06:14
The answer is no, Bob can guarantee a win. Note that on each of Amy's moves, she must choose $k$ to be even. Now let $N = m^2n$ be the current number on the board, where $m^2$ is the largest perfect square divisor of $N$ (hence $n$ is square-free). I claim that Bob can force $n$ to be decreasing after every move. Indeed, note that on Amy's move, she cannot make $n$ increase. So Bob can simply replace the number $N = m^2n$ with $N - m^2 = m^2(n-1)$, decreasing $n$ as desired.
12.11.2021 00:41
Solved with lneis1
08.12.2021 14:18
Sketch of proof:- 1. A:- n=w²+x²+y²+z² 2.B:- x²+y²+z² 3.A:-(x²+y²+z²)^k=a²+b²+c² 4.B:-b²+c² 5.A:-(b²+c²)^r=j²+k² 6.B:-j² 7.A:-j²ⁿ 8.B:-0 (1.) is true by lagrange 4-square theorem. (3.) is true by legendre's theorem (one can check by modular operations that (x²+y²+z²)≠4ⁿ(8b+7) implies (x²+y²+z²)^k≠4ⁿ(8b+7) for any n, b in Z) (5.) is true by brahmagupta fibonacci identity
20.12.2021 04:32
The answer is no. For each number $n$ on the board, let $m$ be the smallest positive integer such that $n$ can be expressed as the sum of $m$ squares. Note that Amy should choose $k$ odd or she instantly loses. Then if $k=2b+1$, $n^k = n^{2b} \cdot n = n^{2b}(a_1^2+a_2^2+ \cdots a_m^2) $, so Amy can't increase $m$. However on Bob's turn he decreases $m$ by $1$. Thus Bob can always win as $m$ is finite (say by Lagrange's Four Square Theorem or the very deep fact that $n = 1 + 1 + \cdots 1$).
11.03.2022 04:27
what? No. We claim that, in fact, Bob can win in $4$ turns. Suppose that the initial number $n_0$ is expressible as a sum of three squares $a^2+b^2+c^2$; Bob can choose $c^2$ and win over the next two turns since the set of positive integers that are sums of two squares is closed under multiplication. Now, suppose that $n_0$ is not expressible as a sum of three squares, then it's necessarily of the form $4^x\cdot (8y+7)$. Bob can simply choose $4^x$, and if $[4^x\cdot (8y+6)]^k$ is not expressible as a sum of three squares, then $(8y+6)^k$ isn't either, and as $k$ is necessarily odd, $8k+6$ must not be expressible as a sum of three squares which is an obvious contradiction. Hence, after Amy's first turn the number Bob receives will be a sum of three squares and he can proceed as in the previous case.
18.02.2023 23:15
The answer is no -- Bob can always guarantee a win. First, we show that if Bob has just made a move and the number is a sum of three squares of nonnegative integers, then Bob is guaranteed to win. Suppose the number on the black board is $x^2+y^2+z^2$ for some nonnegative integers $x$ or $y$. If $x = y = z = 0$ we automatically win, so assume $x+y+z > 0$. Then, Amy will replace the number with $(x^2+y^2+z^2)^r$ for some positive integer $r$. By Legendre's Three Square theorem, a nonnegative integer can be expressed as the sum of three squares if and only if it cannot be expressed as $4^a(8b+7)$ for nonnegative integers $a$ and $b$. If $(x^2+y^2+z^2)^r$ was of this form, then upon writing $x^2+y^2+z^2 = 2^pq$ for $q$ odd, we would have $q^r = 8b+7$, so $q^r\equiv 7\pmod{8}$. Since $q^2\equiv 1\pmod{8}$, it follows that $q^{r_0} \equiv 7\pmod{8}$, where $r_0$ is the remainder when $r$ is divided by $2$. If $r_0 = 0$, we get $1\equiv 7\pmod{8}$, absurd. If $r_0 = 1$, we get $q\equiv 7\pmod{8}$. Since $r_0 = 1$, $r$ is odd, so $(x^2+y^2+z^2) = 2^{pr}q^r$. If $p$ was even, then $x^2+y^2+z^2$ could be expressed as $4^c(8d+7)$ where $c = \frac{p}{2}$ and $d = \frac{q-7}{8}$. Else, $p$ is odd, so $pr$ is odd. However, $pr = 2a$, absurd. Thus, $(x^2+y^2+z^2)^r$ can be expressed as the sum of three perfect squares, say $f^2+g^2+h^2$. Then, Bob can replace this with $(f^2+g^2+h^2)-h^2 = f^2+g^2$ (WLOG $h\neq 0$; we know that $f+g+h > 0$ since $x+y+z > 0$). If $f=g=0$, then Bob wins, so assume $f+g > 0$. Alice will replace this with $(f^2+g^2)^{r_0}$ for some positive integer $r_0$. Since $(x_0^2+y_0^2)(x_1^2+y_1^2) = |x_0x_1-y_0y_1|^2 + (x_0y_1+x_1y_0)^2$ for all nonnegative integers $x_0, y_0, x_1, y_1$, it follows that $(f^2+g^2)^{r_0}$ can be expressed as the sum of two perfect squares, say $f_0^2+g_0^2$. Then, Bob can replace this with $f_0^2+g_0^2 - g_0^2 = f_0^2$ (WLOG $g_0\neq 0$, $f_0+g_0 > 0$ since $f+g > 0$). If $f_0 = 0$ Bob wins, so assume $f_0 > 0$. Then, Alice will replace this with $f_0^{2r_1}$ for some positive integer $r_1$. Then, Bob can just replace this with $f_0^{2r_1} - (f_0^{r_1})^2 = 0$, so Bob wins. Thus, Bob will win if after he has just made a move, the number is expressible as the sum of three perfect squares. Now, suppose the initial number on the board is $n$. Then, by Legendre's Four Square Theorem, $n = n_0^2+n_1^2+n_2^2+n_3^2$ for some nonnegative integers $n_0,n_1,n_2,n_3$. If $n_0=n_1=n_2=n_3 = 0$, then $n = 0$, so Bob wins. Else, $n_0 + n_1 + n_2 + n_3 > 0$, so WLOG assume $n_3 > 0$. Then, Bob can replace $n$ with $(n_0^2+n_1^2+n_2^2+n_3^2) - n_3^2 = n_0^2+n_1^2+n_2^2$, so by the above claim, Bob is guaranteed to win, as desired. $\blacksquare$
14.04.2023 06:58
The answer is no. Define the odd part of a positive integer $n$ as $$\frac{n}{2^{v_2(n)}}.$$Lemma 1: Any positive integer power of a sum of two squares is also a sum of two squares. This is clearly true, since if all exponents of 3 mod 4 primes are even, multiplying all of them by some positive integer they will remain even. Lemma 2: Any positive integer power of a sum of three squares is also a sum of three squares. It is well known that a positive integer is a sum of three squares if and only if it cannot be expressed as $4^a(8b+7)$ for nonnegative integers $a,b.$ Suppose that the original number is $n$ and that $n$ is a sum of three squares. We wish to show that $n^k$ is also a sum of three squares. Case 1: $v_2(n)$ is odd. Then, suppose FTSOC that $n^k=4^a(8b+7).$ Then, $k$ must be even since we need a even $v_2$ on $n^k$ but $v_2(n)$ is odd. Then, the odd part of $n^k$ would be the $k$th power of the odd part of $n$, which is a perfect square. However, 7 is not a quadratic residue mod 8, contradiction. Case 2: $v_2(n)$ is even. Then, the odd part of $n$ is either 1, 3, or 5 mod 8 (it is not 7 since we are assuming that $n$ is a sum of three squares). Then, note that any number that is 1, 3, or 5 mod 8 raised to a positive integer power will never be 7 mod 8, contradiction. Thus, any positive integer power of a sum of three squares is also a sum of three squares. If Bob starts his move with a square, he will obviously win. If Bob starts his move with a sum of two squares, he can make it a square. Then, whatever Amy does, it will still be a square, so Bob can win on the next turn. If Bob starts his move with a sum of three squares, he can make it a sum of two squares. Then, by Lemma 1, no matter what Amy does, Bob will get a sum of two squares on the start of his next move, so he also wins. If Bob starts his move with a sum of four squares, he can make it a sum of three squares. Then, by Lemma 2, no matter what Amy does, Bob will get a sum of three squares on the start of his next move, so he also wins. Since it is well known that every positive integer is the sum of at most 4 squares, we are done.
14.04.2023 16:41
No, Bob has a way to win regardless of Amy's moves. On Bob's first move, he subtracts 1, ending the game if the starting integer was 1, and moving on to Alice's turn otherwise. For obvious reasons, Alice never chooses an even $k.$ Let the integer presented to Bob on his $T+1$th turn be $a_T$. The following strategy suffices: On his $T+1$th turn (for $T\geq1$), Bob chooses $b=\frac{\sqrt{A_{T}}}{\sqrt{A_{0}-T}}.$ On Bob's $A_0$ th move, the game will end. Proof: Proofs are for losers, so I'll give an example instead (the process is easier understood as such). If we start with 5, alice raises to power of 5 ($5^5$), bob subtracts $5^4$ ($4\cdot 5^4$), Alice raises to power of 3 ($4^3\cdot 5^{12}$), Bob subtracts $4^2\cdot 5^{12}$ ($3\cdot 4^2 \cdot 5^{12}$), etc. Eventually we are left with $1\cdot$ a perfect square, and the process terminates. $\blacksquare$
02.09.2023 02:13
We gaming Amy loses the game ! Since all positive integers can be represented in at most 4 perfect squares, suppose n=ab^2, where a is squarefree=c^2+d^2+e^2+f^2, written in the smallest number of squares possible (if one of these are 0 just disregard it). When Amy raises it to an odd power (even ltg immediately) the number becomes ba'^2, which Bob can minus a perfect square multiple of a'^2 to reduce it to only c^2+d^2+e^2=b', new number=b'a'^2, and he can keep doing this, as desired. $\blacksquare$
26.10.2023 04:16
We claim that Bob can always force a win. Consider the function $f$ such that $f(n)$ is the largest square-free divisor of $n$. Note that if $f(n)=1$, then Bob wins. We claim that Bob can force $f(n)$ to always decrease. If the number of the board can be represented as $n = ak^2$ where, $f(n) = a$, then if Bob subtracts $k^2$, then we have $f(n) < a-1$, causing $f(n)$ to decrease. Note that if Alice chooses any exponent, then $f(n)$ doesn't change or become $1$, thus finishing our proof.
22.01.2024 11:25
Firstly we can see that Bob wants to reach a perfect square as this will lead to a $0$, so Amy must always use odd $k$. Claim : Assume that on Amy's turn, the number is of form $st^{2}$, then Bob can make it $(s-1)x^{2}$ for some $x$. So we have that $st^{2} \mapsto (st^{2})^{2j+1}$ and then Bob can subtract $a=t(st^{2})^j$, so we have $(s-1)(t(st^{2})^j)^2$. Let $x=t(st^{2})^j$. So we are done. By our claim we are done.
09.02.2024 02:23
Pretty straightforward. Bob always wins. Claim. Bob wins when the number on the board is of the form $n = 2^k \cdot \ell$ where $\ell$ is $1$ mod $4$. Proof. Amy can do nothing to change the form of this number on her turn. Then, there exists an expression of $n$ in terms of the sum of two squares; hence, Bob can subtract one of those squares, leaving a square number. Bob can obviously win on the next turn. $\blacksquare$ To see that Bob can always convert the number on the board into this given form, suppose that the number is $2^k \cdot \ell$ where $\ell$ is $3$ mod $4$ after his turn. Then, Amy must raise this to an odd power, leaving $2^{2n+1} \cdot \ell^{2n+1}$; on Bob's turn, he can subtract $2^{2n+2}$ to leave $n = 2^{2n+1}(\ell^{2n+1} - 2)$. As $\ell^{2n+1} - 2$ is $1$ mod $4$, this finishes.
20.02.2024 08:00
No, Amy cannot prevent Bob's win. The key claim is the following. Claim: Let $k$ be a fixed odd positive integer. For $j=2, 3$, $n^k$ can be expressed as the sum of $j$ perfect squares if $n$ can be. Proof. For $j=2$, suppose that $n=a^2+b^2$ for positive integers $a$ and $b$. Note that $(a+bi)^k \in \mathbb{Z}[i]$. Thus, we have \[ n^k = (a^2+b^2)^k = |(a+bi)^k|^2 = (\text{Re}((a+bi)^k))^2+(\text{Im}((a+bi)^k))^2, \]so the $j=2$ case holds. Now consider the $j=3$ case. By Legendre's three square theorem, $n$ can be expressed as the sum of $3$ perfect squares if and only if $n \neq 4^p(8q+7)$ for integers $p$ and $q$. Call $n$ not satisfying this property bad. Realize that $n^k$ is bad if and only if $n$ is bad, so the $j=3$ case holds as well. We will show that no matter what number Amy writes down at the beginning, Bob has a winning strategy. Note that if Amy raises a number by an even power, then she loses immediately, so WLOG she always raises by an odd power. By Lagrange's four square theorem, the number $n$ at the beginning can be written as $a^2+b^2+c^2+d^2$ for nonnegative integers $a$, $b$, $c$, and $d$ with $a \le b \le c \le d$. We say that the quadruple $(a, b, c, d)$ is a representation of $n$. In Bob's first move, he can delete $a$, changing the quadruple to $(0, b, c, d)$. By the $j=3$ case of the claim, Amy changes the quadruple to $(0, b', c', d')$ for some $0 \le b' \le c' \le d'$. In the next move, Bob can delete $b'$, resulting in $(0, 0, c', d')$. By the $j=2$ case of the claim, Amy changes the quadruple to $(0, 0, c'', d'')$ for some $0 \le c'' \le d''$. After this move, Bob can delete $c''$, resulting in $(0, 0, 0, d'')$. Regardless of what move Amy makes now, the number at the end of her move will be a perfect square, so Bob wins, as desired.
28.04.2024 05:35
I claim that Bob must always win. We describe his strategy in four steps, that we will put together at the end. Step 1: Given a number not expressible as the sum of three squares $x$ on his turn, conduct some operation to force the number he gets on his next turn to be the sum of $3$ or less squares. Algorithm: By Legendre's Theorem, we know that a number is not the sum of three squares iff it is a power of $4$ times a number that is $7$ mod $8$. Thus, let our current number $x = 4^m (8c + 7)$, Bob takes away $4^m$, then we have a number with odd $2$-adic valuation. Now Alice can raise this number to an even power it is a sum of one square, or he can raise it to an odd power and the $2$-adic valuation is still odd and the number is still a sum of three squares. Step 2: Given a number not expressible as the sum of three squares $x$ on his turn, conduct some operation to force the number he gets on his next turn to be the sum of $2$ or less squares. Algorithm: Let $x = a^2 + b^2 + c^2$, then Bob can subtract $c^2$ to get a number $a^2 + b^2$. Now by the identity $(p^2 + q^2)(r^2 + s^2) = (pr- qs)^2 + (ps - rq)^2$, we know that the product of two numbers that are expressible as the sum of two squares is also a sum of two squares, so clearly raising $a^2+b^2$ to any power gives a number that is expressible as the sum of two squares. Step 3: Given a number not expressible as the sum of one square $x$ on his turn, conduct some operation to force the number he gets on his next turn to be the sum of $1$ or less squares. Algorithm: Given $a^2 + b^2$, we can take away $b^2$ to be left with $a^2$. Step 4: Reduce $a^2$ to $0$. Algorithm: Trivial. Now let $f(n)$ be the unique number such that no set of $f(n) - 1$ squares sum to $n$, but there exists a set of $f(n)$ squares that sum to $n$. It is then clear that $f(n)$ is strictly decreasing using our steps, so we are done.
13.07.2024 07:22
Amy loses the game. On Amy's turn, if she ever chooses $k$ to be even on her turn, Bob immediately wins the next turn; therefore, she can only choose $k$ to be odd. However, this multiplies the number on the board by a perfect square, scaling up the previous situation, rendering Amy's turn useless. So Bob just has to write the initial integer as a sum of squares (say, all $1$'s) and subtract a square one at a time, accounting for the scaling up that happens on Amy's turn.
25.08.2024 19:44
Funny problem. Suppose after Bob's turn the number is $n_0=s^2 \cdot t$ then Amy will turn it into $s^{2(2k+1)} \cdot t^{2k} \cdot t$ (otherwise she loses in $1$ move), so now Bob will take from that away $(s^{2k+1} \cdot t^k)^2$ which then results in the number $s_1^{2} \cdot (t-1)$, if we repeat this process, we notice that the square-free term will eventually become $1$, and therefore Bob can eventually force a perfect square and just delete it. Therefore Amy cannot prevent Bob from winning thus we are done .
18.09.2024 02:05
Bob wins. Denote by $S(n)$ the squarefree part of $n$. Obviously to avoid losing $k$ must be odd whence $S(n^k) = S((n^{k / 2})^2 \cdot n) = S(n)$. Now note that Bob can ensure that $S(n)$ strictly decreases by setting $a = \sqrt{n^k / S(n)}$ and we're done as $S(n)$ eventually hits $1$.
14.11.2024 15:09
Some students figured out the Lagrange solution but also that it can be less theoretically heavy by just writing $n = 1^2 + 1^2 + \cdots + 1^2$ and using the strategy as illustrated in the above posts.
19.12.2024 05:25
Write the number on the board as $m^2n$ where $m, n$ are integers with $n$ squarefree. When it is Bob's turn, he can choose $b=m,$ which yields $m^2(n-1).$ Then, clearly Amy cannot choose an even $k.$ Therefore, $k$ is odd but if we write $k=2x+1$ we get $((n-1)^{2x}m^{2x+1})^2(n-1) = m_0^2 (n-1).$ Therefore, she does not change the value of $n.$ Hence, $n$ is strictly decreasing and eventually will go to zero as long as Bob picks $b=m$ on his turn. Hence, Amy cannot prevent Bob from winning.
24.12.2024 21:48
storage
10.01.2025 22:49
We claim that Bob wins regardless of how Amy plays. For this, express the first number $n$ written on the board as $n=m^2t$, where $t$ is square-free. We call $t$ the square-free part of $n$. We will proceed by induction on the square-free part of $n$: Base case. For $ t=1$ Bob just chooses $a=m$, which makes the resulting number $m^2-m^2=0$, and thus wins. Inductive step. Assume it true for $ t=1, 2, \dots, s$. Now we need to show that Bob wins if $n=m^2(s+1)$ for any $m$. We distinguish two cases: Case 1. $s+1$ is not square free Rewrite this as $s+1=l^2q$ for some $l>1$, $q<s+1$, then $n=(ml)^2q$, so we are done by induction. Case 2. If $s+1$ is square-free Bob chooses $a=m$. Like this the number on the board will be $m^2s$. Now, if Amy chooses an even $k$ we fall into the base case $t=1$, so we are done. If not, say she chooses $k=2k'+1$, we have that the resulting number will be of the form $(m^2s)^{2k'+1}=\left(m^{2k'+1}s^{k'}\right)^2s$, which has a square-free part between $1$ and $s$, so again we are done by induction.