An integer $a$ is called friendly if the equation $\left(m^{2}+n\right)\left(n^{2}+m\right)=a(m-n)^{3}$ has a solution over the positive integers.  a) Prove that there are at least 500 friendly integers in the set $\{1,2, \ldots, 2012\}$.  b) Decide whether $a=2$ is friendly.

Solution: a) Every $a$ of the form $a=4 k-3$ with $k \geq 2$ is friendly. Indeed the numbers $m=2 k-1>0$ and $n=k-1>0$ satisfy the given equation with $a=4 k-3$ :  $$ \left(m^{2}+n\right)\left(n^{2}+m\right)=\left((2 k-1)^{2}+(k-1)\right)\left((k-1)^{2}+(2 k-1)\right)=(4 k-3) k^{3}=a(m-n)^{3} \text {. } $$  Hence $5,9, \ldots, 2009$ are friendly and so $\{1,2, \ldots, 2012\}$ contains at least 502 friendly numbers.  b) We show that $a=2$ is not friendly. Consider the equation with $a=2$ and rewrite its left-hand side as a difference of squares:  $$ \frac{1}{4}\left(\left(m^{2}+n+n^{2}+m\right)^{2}-\left(m^{2}+n-n^{2}-m\right)^{2}\right)=2(m-n)^{3} $$  Since $m^{2}+n-n^{2}-m=(m-n)(m+n-1)$, we can further reformulate the equation as  $$ \left(m^{2}+n+n^{2}+m\right)^{2}=(m-n)^{2}\left(8(m-n)+(m+n-1)^{2}\right) . $$  It follows that $8(m-n)+(m+n-1)^{2}$ is a perfect square. Clearly $m>n$, hence there is an integer $s \geq 1$ such that  $$ (m+n-1+2 s)^{2}=8(m-n)+(m+n-1)^{2} . $$  Subtracting the squares gives $s(m+n-1+s)=2(m-n)$. Since $m+n-1+s>m-n$, we conclude that $s<2$. Therefore the only possibility is $s=1$ and $m=3 n$. However then the left-hand side of the given equation (with $a=2$ ) is greater than $m^{3}=27 n^{3}$, whereas its right-hand side equals $16 n^{3}$. The contradiction proves that $a=2$ is not friendly.  Comment. A computer search shows that there are 561 friendly numbers in $\{1,2, \ldots, 2012\}$.


For a nonnegative integer $n$ define $\operatorname{rad}(n)=1$ if $n=0$ or $n=1$, and $\operatorname{rad}(n)=p_{1} p_{2} \cdots p_{k}$ where $p_{1}<p_{2}<\cdots<p_{k}$ are all prime factors of $n$. Find all polynomials $f(x)$ with nonnegative integer coefficients such that $\operatorname{rad}(f(n))$ divides $\operatorname{rad}\left(f\left(n^{r a d(n)}\right)\right)$ for every nonnegative integer $n$.

Solution: We are going to prove that $f(x)=a x^{m}$ for some nonnegative integers $a$ and $m$. If $f(x)$ is the zero polynomial we are done, so assume that $f(x)$ has at least one positive coefficient. In particular $f(1)>0$.  Let $p$ be a prime number. The condition is that $f(n) \equiv 0(\bmod p)$ implies  $$ f\left(n^{\operatorname{rad}(n)}\right) \equiv 0 \quad(\bmod p) $$  Since $\operatorname{rad}\left(n^{\operatorname{rad}(n)^{k}}\right)=\operatorname{rad}(n)$ for all $k$, repeated applications of the preceding implication show that if $p$ divides $f(n)$ then  $$ f\left(n^{\operatorname{rad}(n)^{k}}\right) \equiv 0 \quad(\bmod p) \quad \text { for all } k . $$  The idea is to construct a prime $p$ and a positive integer $n$ such that $p-1$ divides $n$ and $p$ divides $f(n)$. In this case, for $k$ large enough $p-1$ divides $\operatorname{rad}(n)^{k}$. Hence if $(p, n)=1$ then $n^{r a d(n)^{k}} \equiv 1(\bmod p)$ by FERMAT's little theorem, so that  $$ f(1) \equiv f\left(n^{\operatorname{rad}(n)^{k}}\right) \equiv 0 \quad(\bmod p) . $$  Suppose that $f(x)=g(x) x^{m}$ with $g(0) \neq 0$. Let $t$ be a positive integer, $p$ any prime factor of $g(-t)$ and $n=(p-1) t$. So $p-1$ divides $n$ and $f(n)=f((p-1) t) \equiv f(-t) \equiv 0(\bmod p)$, hence either $(p, n)>1$ or $(2)$ holds. If $(p,(p-1) t)>1$ then $p$ divides $t$ and $g(0) \equiv g(-t) \equiv 0(\bmod p)$, meaning that $p$ divides $g(0)$.  In conclusion we proved that each prime factor of $g(-t)$ divides $g(0) f(1) \neq 0$, and thus the set of prime factors of $g(-t)$ when $t$ ranges through the positive integers is finite. This is known to imply that $g(x)$ is a constant polynomial, and so $f(x)=a x^{m}$.


Solution: Let $f(x)$ be a polynomial with integer coefficients (not necessarily nonnegative) such that $\operatorname{rad}(f(n))$ divides $\operatorname{rad}\left(f\left(n^{\operatorname{rad}(n)}\right)\right)$ for any nonnegative integer $n$. We give a complete description of all polynomials with this property. More precisely, we claim that if $f(x)$ is such a polynomial and $\xi$ is a root of $f(x)$ then so is $\xi^{d}$ for every positive integer $d$.  Therefore each root of $f(x)$ is zero or a root of unity. In particular, if a root of unity $\xi$ is a root of $f(x)$ then $1=\xi^{d}$ is a root too (for some positive integer $d$ ). In the original problem $f(x)$ has nonnegative coefficients. Then either $f(x)$ is the zero polynomial or $f(1)>0$ and $\xi=0$ is the only possible root. In either case $f(x)=a x^{m}$ with $a$ and $m$ nonnegative integers.  To prove the claim let $\xi$ be a root of $f(x)$, and let $g(x)$ be an irreducible factor of $f(x)$ such that $g(\xi)=0$. If 0 or 1 are roots of $g(x)$ then either $\xi=0$ or $\xi=1$ (because $g(x)$ is irreducible) and we are done. So assume that $g(0), g(1) \neq 0$. By decomposing $d$ as a product of prime numbers, it is enough to consider the case $d=p$ prime. We argue for $p=2$. Since $\operatorname{rad}\left(2^{k}\right)=2$ for every $k$, we have  $$ \operatorname{rad}\left(f\left(2^{k}\right)\right) \mid \operatorname{rad}\left(f\left(2^{2 k}\right)\right) . $$  Now we prove that $g(x)$ divides $f\left(x^{2}\right)$. Suppose that this is not the case. Then, since $g(x)$ is irreducible, there are integer-coefficient polynomials $a(x), b(x)$ and an integer $N$ such that  $$ a(x) g(x)+b(x) f\left(x^{2}\right)=N $$  Each prime factor $p$ of $g\left(2^{k}\right)$ divides $f\left(2^{k}\right)$, so by $\operatorname{rad}\left(f\left(2^{k}\right)\right) \mid \operatorname{rad}\left(f\left(2^{2 k}\right)\right)$ it also divides $f\left(2^{2 k}\right)$. From the equation above with $x=2^{k}$ it follows that $p$ divides $N$.  In summary, each prime divisor of $g\left(2^{k}\right)$ divides $N$, for all $k \geq 0$. Let $p_{1}, \ldots, p_{n}$ be the odd primes dividing $N$, and suppose that  $$ g(1)=2^{\alpha} p_{1}^{\alpha_{1}} \cdots p_{n}^{\alpha_{n}} $$  If $k$ is divisible by $\varphi\left(p_{1}^{\alpha_{1}+1} \cdots p_{n}^{\alpha_{n}+1}\right)$ then  $$ 2^{k} \equiv 1 \quad\left(\bmod p_{1}^{\alpha_{1}+1} \cdots p_{n}^{\alpha_{n}+1}\right) $$  yielding  $$ g\left(2^{k}\right) \equiv g(1) \quad\left(\bmod p_{1}^{\alpha_{1}+1} \cdots p_{n}^{\alpha_{n}+1}\right) $$  It follows that for each $i$ the maximal power of $p_{i}$ dividing $g\left(2^{k}\right)$ and $g(1)$ is the same, namely $p_{i}^{\alpha_{i}}$. On the other hand, for large enough $k$, the maximal power of 2 dividing $g\left(2^{k}\right)$ and $g(0) \neq 0$ is the same. From the above, for $k$ divisible by $\varphi\left(p_{1}^{\alpha_{1}+1} \cdots p_{n}^{\alpha_{n}+1}\right)$ and large enough, we obtain that $g\left(2^{k}\right)$ divides $g(0) \cdot g(1)$. This is impossible because $g(0), g(1) \neq 0$ are fixed and $g\left(2^{k}\right)$ is arbitrarily large.  In conclusion, $g(x)$ divides $f\left(x^{2}\right)$. Recall that $\xi$ is a root of $f(x)$ such that $g(\xi)=0$; then $f\left(\xi^{2}\right)=0$, i. e. $\xi^{2}$ is a root of $f(x)$.  Likewise if $\xi$ is a root of $f(x)$ and $p$ an arbitrary prime then $\xi^{p}$ is a root too. The argument is completely analogous, in the proof above just replace 2 by $p$ and "odd prime" by "prime different from $p . "$  Comment. The claim in the second solution can be proved by varying $n(\bmod p)$ in $(1)$. For instance, we obtain  $$ f\left(n^{\operatorname{rad}(n+p k)}\right) \equiv 0 \quad(\bmod p) $$  for every positive integer $k$. One can prove that if $(n, p)=1$ then $\operatorname{rad}(n+p k)$ runs through all residue classes $r(\bmod p-1)$ with $(r, p-1)$ squarefree. Hence if $f(n) \equiv 0(\bmod p)$ then $f\left(n^{r}\right) \equiv 0(\bmod p)$ for all integers $r$. This implies the claim by an argument leading to the identity (3).


Let $x$ and $y$ be positive integers. If $x^{2^{n}}-1$ is divisible by $2^{n} y+1$ for every positive integer $n$, prove that $x=1$.

Solution: First we prove the following fact: For every positive integer $y$ there exist infinitely many primes $p \equiv 3(\bmod 4)$ such that $p$ divides some number of the form $2^{n} y+1$.  Clearly it is enough to consider the case $y$ odd. Let  $$ 2 y+1=p_{1}^{e_{1}} \cdots p_{r}^{e_{r}} $$  be the prime factorization of $2 y+1$. Suppose on the contrary that there are finitely many primes $p_{r+1}, \ldots, p_{r+s} \equiv 3(\bmod 4)$ that divide some number of the form $2^{n} y+1$ but do not divide $2 y+1$.  We want to find an $n$ such that $p_{i}^{e_{i}} \| 2^{n} y+1$ for $1 \leq i \leq r$ and $p_{i} \nmid 2^{n} y+1$ for $r+1 \leq i \leq r+s$. For this it suffices to take  $$ n=1+\varphi\left(p_{1}^{e_{1}+1} \cdots p_{r}^{e_{r}+1} p_{r+1}^{1} \cdots p_{r+s}^{1}\right) $$  because then  $$ 2^{n} y+1 \equiv 2 y+1 \quad\left(\bmod p_{1}^{e_{1}+1} \cdots p_{r}^{e_{r}+1} p_{r+1}^{1} \cdots p_{r+s}^{1}\right) $$  The last congruence means that $p_{1}^{e_{1}}, \ldots, p_{r}^{e_{r}}$ divide exactly $2^{n} y+1$ and no prime $p_{r+1}, \ldots, p_{r+s}$ divides $2^{n} y+1$. It follows that the prime factorization of $2^{n} y+1$ consists of the prime powers $p_{1}^{e_{1}}, \ldots, p_{r}^{e_{r}}$ and powers of primes $\equiv 1(\bmod 4)$. Because $y$ is odd, we obtain  $$ 2^{n} y+1 \equiv p_{1}^{e_{1}} \cdots p_{r}^{e_{r}} \equiv 2 y+1 \equiv 3 \quad(\bmod 4) $$  This is a contradiction since $n>1$, and so $2^{n} y+1 \equiv 1(\bmod 4)$.  Now we proceed to the problem. If $p$ is a prime divisor of $2^{n} y+1$ the problem statement implies that $x^{d} \equiv 1(\bmod p)$ for $d=2^{n}$. By FERMAT's little theorem the same congruence holds for $d=p-1$, so it must also hold for $d=\left(2^{n}, p-1\right)$. For $p \equiv 3(\bmod 4)$ we have $\left(2^{n}, p-1\right)=2$, therefore in this case $x^{2} \equiv 1(\bmod p)$.  In summary, we proved that every prime $p \equiv 3(\bmod 4)$ that divides some number of the form $2^{n} y+1$ also divides $x^{2}-1$. This is possible only if $x=1$, otherwise by the above $x^{2}-1$ would be a positive integer with infinitely many prime factors.  Comment. For each $x$ and each odd prime $p$ the maximal power of $p$ dividing $x^{2^{n}}-1$ for some $n$ is bounded and hence the same must be true for the numbers $2^{n} y+1$. We infer that $p^{2}$ divides $2^{p-1}-1$ for each prime divisor $p$ of $2^{n} y+1$. However trying to reach a contradiction with this conclusion alone seems hopeless, since it is not even known if there are infinitely many primes $p$ without this property.


Solution: Such numbers $a_{1}, a_{2}, \ldots, a_{n}$ exist if and only if $n \equiv 1(\bmod 4)$ or $n \equiv 2(\bmod 4)$.  Let $\sum_{k=1}^{n} \frac{k}{3^{a} k}=1$ with $a_{1}, a_{2}, \ldots, a_{n}$ nonnegative integers. Then $1 \cdot x_{1}+2 \cdot x_{2}+\cdots+n \cdot x_{n}=3^{a}$ with $x_{1}, \ldots, x_{n}$ powers of 3 and $a \geq 0$. The right-hand side is odd, and the left-hand side has the same parity as $1+2+\cdots+n$. Hence the latter sum is odd, which implies $n \equiv 1,2(\bmod 4)$. Now we prove the converse.  Call feasible a sequence $b_{1}, b_{2}, \ldots, b_{n}$ if there are nonnegative integers $a_{1}, a_{2}, \ldots, a_{n}$ such that  $$ \frac{1}{2^{a_{1}}}+\frac{1}{2^{a_{2}}}+\cdots+\frac{1}{2^{a_{n}}}=\frac{b_{1}}{3^{a_{1}}}+\frac{b_{2}}{3^{a_{2}}}+\cdots+\frac{b_{n}}{3^{a_{n}}}=1 $$  Let $b_{k}$ be a term of a feasible sequence $b_{1}, b_{2}, \ldots, b_{n}$ with exponents $a_{1}, a_{2}, \ldots, a_{n}$ like above, and let $u, v$ be nonnegative integers with sum $3 b_{k}$. Observe that  $$ \frac{1}{2^{a_{k}+1}}+\frac{1}{2^{a_{k}+1}}=\frac{1}{2^{a_{k}}} \quad \text { and } \quad \frac{u}{3^{a_{k}+1}}+\frac{v}{3^{a_{k}+1}}=\frac{b_{k}}{3^{a_{k}}} $$  It follows that the sequence $b_{1}, \ldots, b_{k-1}, u, v, b_{k+1}, \ldots, b_{n}$ is feasible. The exponents $a_{i}$ are the same for the unchanged terms $b_{i}, i \neq k$; the new terms $u, v$ have exponents $a_{k}+1$.  We state the conclusion in reverse. If two terms $u, v$ of a sequence are replaced by one term $\frac{u+v}{3}$ and the obtained sequence is feasible, then the original sequence is feasible too. Denote by $\alpha_{n}$ the sequence $1,2, \ldots, n$. To show that $\alpha_{n}$ is feasible for $n \equiv 1,2(\bmod 4)$, we transform it by $n-1$ replacements $\{u, v\} \mapsto \frac{u+v}{3}$ to the one-term sequence $\alpha_{1}$. The latter is feasible, with $a_{1}=0$. Note that if $m$ and $2 m$ are terms of a sequence then $\{m, 2 m\} \mapsto m$, so $2 m$ can be ignored if necessary.  Let $n \geq 16$. We prove that $\alpha_{n}$ can be reduced to $\alpha_{n-12}$ by 12 operations. Write $n=12 k+r$ where $k \geq 1$ and $0 \leq r \leq 11$. If $0 \leq r \leq 5$ then the last 12 terms of $\alpha_{n}$ can be partitioned into 2 singletons $\{12 k-6\},\{12 k\}$ and the following 5 pairs:  $$ \{12 k-6-i, 12 k-6+i\}, i=1, \ldots, 5-r ; \quad\{12 k-j, 12 k+j\}, j=1, \ldots, r . $$  (There is only one kind of pairs if $r \in\{0,5\}$.) One can ignore $12 k-6$ and $12 k$ since $\alpha_{n}$ contains $6 k-3$ and $6 k$. Furthermore the 5 operations $\{12 k-6-i, 12 k-6+i\} \mapsto 8 k-4$ and $\{12 k-j, 12 k+j\} \mapsto 8 k$ remove the 10 terms in the pairs and bring in 5 new terms equal to $8 k-4$ or $8 k$. All of these can be ignored too as $4 k-2$ and $4 k$ are still present in the sequence. Indeed $4 k \leq n-12$ is equivalent to $8 k \geq 12-r$, which is true for $r \in\{4,5\}$. And if $r \in\{0,1,2,3\}$ then $n \geq 16$ implies $k \geq 2$, so $8 k \geq 12-r$ also holds. Thus $\alpha_{n}$ reduces to $\alpha_{n-12}$.  The case $6 \leq r \leq 11$ is analogous. Consider the singletons $\{12 k\},\{12 k+6\}$ and the 5 pairs  $$ \{12 k-i, 12 k+i\}, i=1, \ldots, 11-r ; \quad\{12 k+6-j, 12 k+6+j\}, j=1, \ldots, r-6 $$  Ignore the singletons like before, then remove the pairs via operations $\{12 k-i, 12 k+i\} \mapsto 8 k$ and $\{12 k+6-j, 12 k+6+j\} \mapsto 8 k+4$. The 5 newly-appeared terms $8 k$ and $8 k+4$ can be ignored too since $4 k+2 \leq n-12$ (this follows from $k \geq 1$ and $r \geq 6$ ). We obtain $\alpha_{n-12}$ again.  The problem reduces to $2 \leq n \leq 15$. In fact $n \in\{2,5,6,9,10,13,14\}$ by $n \equiv 1,2(\bmod 4)$. The cases $n=2,6,10,14$ reduce to $n=1,5,9,13$ respectively because the last even term of $\alpha_{n}$ can be ignored. For $n=5$ apply $\{4,5\} \mapsto 3$, then $\{3,3\} \mapsto 2$, then ignore the 2 occurrences of 2 . For $n=9$ ignore 6 first, then apply $\{5,7\} \mapsto 4,\{4,8\} \mapsto 4,\{3,9\} \mapsto 4$. Now ignore the 3 occurrences of 4 , then ignore 2. Finally $n=13$ reduces to $n=10$ by $\{11,13\} \mapsto 8$ and ignoring 8 and 12 . The proof is complete.


Prove that for every prime $p>100$ and every integer $r$ there exist two integers $a$ and $b$ such that $p$ divides $a^{2}+b^{5}-r$.

Solution: Throughout the solution, all congruence relations are meant modulo $p$.  Fix $p$, and let $\mathcal{P}=\{0,1, \ldots, p-1\}$ be the set of residue classes modulo $p$. For every $r \in \mathcal{P}$, let $S_{r}=\left\{(a, b) \in \mathcal{P} \times \mathcal{P}: a^{2}+b^{5} \equiv r\right\}$, and let $s_{r}=\left|S_{r}\right|$. Our aim is to prove $s_{r}>0$ for all $r \in \mathcal{P}$.  We will use the well-known fact that for every residue class $r \in \mathcal{P}$ and every positive integer $k$, there are at most $k$ values $x \in \mathcal{P}$ such that $x^{k} \equiv r$.  Lemma. Let $N$ be the number of quadruples $(a, b, c, d) \in \mathcal{P}^{4}$ for which $a^{2}+b^{5} \equiv c^{2}+d^{5}$. Then  $$ N=\sum_{r \in \mathcal{P}} s_{r}^{2} $$  and  $$ N \leq p\left(p^{2}+4 p-4\right) $$  Proof. (a) For each residue class $r$ there exist exactly $s_{r}$ pairs $(a, b)$ with $a^{2}+b^{5} \equiv r$ and $s_{r}$ pairs $(c, d)$ with $c^{2}+d^{5} \equiv r$. So there are $s_{r}^{2}$ quadruples with $a^{2}+b^{5} \equiv c^{2}+d^{5} \equiv r$. Taking the sum over all $r \in \mathcal{P}$, the statement follows.  (b) Choose an arbitrary pair $(b, d) \in \mathcal{P}$ and look for the possible values of $a, c$.  1. Suppose that $b^{5} \equiv d^{5}$, and let $k$ be the number of such pairs $(b, d)$. The value $b$ can be chosen in $p$ different ways. For $b \equiv 0$ only $d=0$ has this property; for the nonzero values of $b$ there are at most 5 possible values for $d$. So we have $k \leq 1+5(p-1)=5 p-4$.  The values $a$ and $c$ must satisfy $a^{2} \equiv c^{2}$, so $a \equiv \pm c$, and there are exactly $2 p-1$ such pairs $(a, c)$.  2. Now suppose $b^{5} \not \equiv d^{5}$. In this case $a$ and $c$ must be distinct. By $(a-c)(a+c)=d^{5}-b^{5}$, the value of $a-c$ uniquely determines $a+c$ and thus $a$ and $c$ as well. Hence, there are $p-1$ suitable pairs $(a, c)$.  Thus, for each of the $k$ pairs $(b, d)$ with $b^{5} \equiv d^{5}$ there are $2 p-1$ pairs $(a, c)$, and for each of the other $p^{2}-k$ pairs $(b, d)$ there are $p-1$ pairs $(a, c)$. Hence,  $$ N=k(2 p-1)+\left(p^{2}-k\right)(p-1)=p^{2}(p-1)+k p \leq p^{2}(p-1)+(5 p-4) p=p\left(p^{2}+4 p-4\right) $$  To prove the statement of the problem, suppose that $S_{r}=\emptyset$ for some $r \in \mathcal{P}$; obviously $r \not \equiv 0$. Let $T=\left\{x^{10}: x \in \mathcal{P} \backslash\{0\}\right\}$ be the set of nonzero 10th powers modulo $p$. Since each residue class is the 10 th power of at most 10 elements in $\mathcal{P}$, we have $|T| \geq \frac{p-1}{10} \geq 4$ by $p>100$.  For every $t \in T$, we have $S_{t r}=\emptyset$. Indeed, if $(x, y) \in S_{t r}$ and $t \equiv z^{10}$ then  $$ \left(z^{-5} x\right)^{2}+\left(z^{-2} y\right)^{5} \equiv t^{-1}\left(x^{2}+y^{5}\right) \equiv r $$  so $\left(z^{-5} x, z^{-2} y\right) \in S_{r}$. So, there are at least $\frac{p-1}{10} \geq 4$ empty sets among $S_{1}, \ldots, S_{p-1}$, and there are at most $p-4$ nonzero values among $s_{0}, s_{2}, \ldots, s_{p-1}$. Then by the AM-QM inequality we obtain  $$ N=\sum_{r \in \mathcal{P} \backslash r T} s_{r}^{2} \geq \frac{1}{p-4}\left(\sum_{r \in \mathcal{P} \backslash r T} s_{r}\right)^{2}=\frac{|\mathcal{P} \times \mathcal{P}|^{2}}{p-4}=\frac{p^{4}}{p-4}>p\left(p^{2}+4 p-4\right), $$  which is impossible by the lemma.


Solution: If $5 \nmid p-1$, then all modulo $p$ residue classes are complete fifth powers and the statement is trivial. So assume that $p=10 k+1$ where $k \geq 10$. Let $g$ be a primitive root modulo $p$.  We will use the following facts:  (F1) If some residue class $x$ is not quadratic then $x^{(p-1) / 2} \equiv-1(\bmod p)$.  (F2) For every integer $d$, as a simple corollary of the summation formula for geometric progressions,  $$ \sum_{i=0}^{2 k-1} g^{5 d i} \equiv\left\{\begin{array}{ll} 2 k & \text { if } 2 k \mid d \\ 0 & \text { if } 2 k \not \nless d \end{array} \quad(\bmod p)\right. $$  Suppose that, contrary to the statement, some modulo $p$ residue class $r$ cannot be expressed as $a^{2}+b^{5}$. Of course $r \not \equiv 0(\bmod p)$. By $(\mathrm{F} 1)$ we have $\left(r-b^{5}\right)^{(p-1) / 2}=\left(r-b^{5}\right)^{5 k} \equiv-1(\bmod p)$ for all residue classes $b$.  For $t=1,2 \ldots, k-1$ consider the sums  $$ S(t)=\sum_{i=0}^{2 k-1}\left(r-g^{5 i}\right)^{5 k} g^{5 t i} $$  By the indirect assumption and (F2),  $$ S(t)=\sum_{i=0}^{2 k-1}\left(r-\left(g^{i}\right)^{5}\right)^{5 k} g^{5 t i} \equiv \sum_{i=0}^{2 k-1}(-1) g^{5 t i} \equiv-\sum_{i=0}^{2 k-1} g^{5 t i} \equiv 0 \quad(\bmod p) $$  because $2 k$ cannot divide $t$.  On the other hand, by the binomial theorem,  $$ \begin{aligned} S(t) & =\sum_{i=0}^{2 k-1}\left(\sum_{j=0}^{5 k}\left(\begin{array}{c} 5 k \\ j \end{array}\right) r^{5 k-j}\left(-g^{5 i}\right)^{j}\right) g^{5 t i}=\sum_{j=0}^{5 k}(-1)^{j}\left(\begin{array}{c} 5 k \\ j \end{array}\right) r^{5 k-j}\left(\sum_{i=0}^{2 k-1} g^{5(j+t) i}\right) \equiv \\ & \equiv \sum_{j=0}^{5 k}(-1)^{j}\left(\begin{array}{c} 5 k \\ j \end{array}\right) r^{5 k-j}\left\{\begin{array}{ll} 2 k & \text { if } 2 k \mid j+t \\ 0 & \text { if } 2 k \not j j+t \end{array}(\bmod p) .\right. \end{aligned} $$  Since $1 \leq j+t<6 k$, the number $2 k$ divides $j+t$ only for $j=2 k-t$ and $j=4 k-t$. Hence,  $$ \begin{gathered} 0 \equiv S(t) \equiv(-1)^{t}\left(\left(\begin{array}{c} 5 k \\ 2 k-t \end{array}\right) r^{3 k+t}+\left(\begin{array}{c} 5 k \\ 4 k-t \end{array}\right) r^{k+t}\right) \cdot 2 k \quad(\bmod p), \\ \left(\begin{array}{c} 5 k \\ 2 k-t \end{array}\right) r^{2 k}+\left(\begin{array}{c} 5 k \\ 4 k-t \end{array}\right) \equiv 0 \quad(\bmod p) . \end{gathered} $$  Taking this for $t=1,2$ and eliminating $r$, we get  $$ \begin{aligned} 0 & \equiv\left(\begin{array}{c} 5 k \\ 2 k-2 \end{array}\right)\left(\left(\begin{array}{c} 5 k \\ 2 k-1 \end{array}\right) r^{2 k}+\left(\begin{array}{c} 5 k \\ 4 k-1 \end{array}\right)\right)-\left(\begin{array}{c} 5 k \\ 2 k-1 \end{array}\right)\left(\left(\begin{array}{c} 5 k \\ 2 k-2 \end{array}\right) r^{2 k}+\left(\begin{array}{c} 5 k \\ 4 k-2 \end{array}\right)\right) \\ & =\left(\begin{array}{c} 5 k \\ 2 k-2 \end{array}\right)\left(\begin{array}{c} 5 k \\ 4 k-1 \end{array}\right)-\left(\begin{array}{c} 5 k \\ 2 k-1 \end{array}\right)\left(\begin{array}{c} 5 k \\ 4 k-2 \end{array}\right) \\ & =\frac{(5 k) !^{2}}{(2 k-1) !(3 k+2) !(4 k-1) !(k+2) !}((2 k-1)(k+2)-(3 k+2)(4 k-1)) \\ & =\frac{-(5 k) !^{2} \cdot 2 k(5 k+1)}{(2 k-1) !(3 k+2) !(4 k-1) !(k+2) !}(\bmod p) . \end{aligned} $$  But in the last expression none of the numbers is divisible by $p=10 k+1$, a contradiction.  Comment 1. The argument in the second solution is valid whenever $k \geq 3$, that is for all primes $p=10 k+1$ except $p=11$. This is an exceptional case when the statement is not true; $r=7$ cannot be expressed as desired.  Comment 2. The statement is true in a more general setting: for every positive integer $n$, for all sufficiently large $p$, each residue class modulo $p$ can be expressed as $a^{2}+b^{n}$. Choosing $t=3$ would allow using the Cauchy-Davenport theorem (together with some analysis on the case of equality).  In the literature more general results are known. For instance, the statement easily follows from the Hasse-Weil bound.


The columns and the rows of a $3 n \times 3 n$ square board are numbered $1,2, \ldots, 3 n$. Every square $(x, y)$ with $1 \leq x, y \leq 3 n$ is colored asparagus, byzantium or citrine according as the modulo 3 remainder of $x+y$ is 0 , 1 or 2 respectively. One token colored asparagus, byzantium or citrine is placed on each square, so that there are $3 n^{2}$ tokens of each color.  Suppose that one can permute the tokens so that each token is moved to a distance of at most $d$ from its original position, each asparagus token replaces a byzantium token, each byzantium token replaces a citrine token, and each citrine token replaces an asparagus token. Prove that it is possible to permute the tokens so that each token is moved to a distance of at most $d+2$ from its original position, and each square contains a token with the same color as the square.

Solution: Without loss of generality it suffices to prove that the A-tokens can be moved to distinct $\mathrm{A}$-squares in such a way that each $\mathrm{A}$-token is moved to a distance at most $d+2$ from its original place. This means we need a perfect matching between the $3 n^{2} \mathrm{~A}$-squares and the $3 n^{2}$ A-tokens such that the distance in each pair of the matching is at most $d+2$.  To find the matching, we construct a bipartite graph. The A-squares will be the vertices in one class of the graph; the vertices in the other class will be the A-tokens.  Split the board into $3 \times 1$ horizontal triminos; then each trimino contains exactly one Asquare. Take a permutation $\pi$ of the tokens which moves A-tokens to B-tokens, B-tokens to C-tokens, and C-tokens to A-tokens, in each case to a distance at most $d$. For each A-square $S$, and for each A-token $T$, connect $S$ and $T$ by an edge if $T, \pi(T)$ or $\pi^{-1}(T)$ is on the trimino containing $S$. We allow multiple edges; it is even possible that the same square and the same token are connected with three edges. Obviously the lengths of the edges in the graph do not exceed $d+2$. By length of an edge we mean the distance between the A-square and the A-token it connects.  Each A-token $T$ is connected with the three A-squares whose triminos contain $T, \pi(T)$ and $\pi^{-1}(T)$. Therefore in the graph all tokens are of degree 3. We show that the same is true for the A-squares. Let $S$ be an arbitrary A-square, and let $T_{1}, T_{2}, T_{3}$ be the three tokens on the trimino containing $S$. For $i=1,2,3$, if $T_{i}$ is an A-token, then $S$ is connected with $T_{i}$; if $T_{i}$ is a B-token then $S$ is connected with $\pi^{-1}\left(T_{i}\right)$; finally, if $T_{i}$ is a C-token then $S$ is connected with $\pi\left(T_{i}\right)$. Hence in the graph the A-squares also are of degree 3.  Since the A-squares are of degree 3 , from every set $\mathcal{S}$ of A-squares exactly $3|\mathcal{S}|$ edges start. These edges end in at least $|\mathcal{S}|$ tokens because the A-tokens also are of degree 3. Hence every set $\mathcal{S}$ of A-squares has at least $|\mathcal{S}|$ neighbors among the A-tokens.  Therefore, by HALL's marriage theorem, the graph contains a perfect matching between the two vertex classes. So there is a perfect matching between the A-squares and A-tokens with edges no longer than $d+2$. It follows that the tokens can be permuted as specified in the problem statement.  Comment 1. In the original problem proposal the board was infinite and there were only two colors. Having $n$ colors for some positive integer $n$ was an option; we chose $n=3$. Moreover, we changed the board to a finite one to avoid dealing with infinite graphs (although Hall's theorem works in the infinite case as well).  With only two colors Hall's theorem is not needed. In this case we split the board into $2 \times 1$ dominos, and in the resulting graph all vertices are of degree 2. The graph consists of disjoint cycles with even length and infinite paths, so the existence of the matching is trivial.  Having more than three colors would make the problem statement more complicated, because we need a matching between every two color classes of tokens. However, this would not mean a significant increase in difficulty.  Comment 2. According to Wikipedia, the color asparagus (hexadecimal code \#87A96B) is a tone of green that is named after the vegetable. Crayola created this color in 1993 as one of the 16 to be named in the Name The Color Contest. Byzantium (\#702963) is a dark tone of purple. Its first recorded use as a color name in English was in 1926. Citrine (\#E4D00A) is variously described as yellow, greenish-yellow, brownish-yellow or orange. The first known use of citrine as a color name in English was in the 14th century.


For a nonnegative integer $n$ define $\operatorname{rad}(n)=1$ if $n=0$ or $n=1$, and $\operatorname{rad}(n)=p_{1} p_{2} \cdots p_{k}$ where $p_{1}<p_{2}<\cdots<p_{k}$ are all prime factors of $n$. Find all polynomials $f(x)$ with nonnegative integer coefficients such that $\operatorname{rad}(f(n))$ divides $\operatorname{rad}\left(f\left(n^{\operatorname{rad}(n)}\right)\right)$ for every nonnegative integer $n$.