
Problem 8.3. Let $n$ be a natural number. Find all integer values of $m$ such that $k=2^{m-2}$ is integer and $A=1999^{k}+6$ is a sum of the squares of $n$ integers (not necessarily distinct and different from zero).


Solution: It is sufficient to consider only nonnegative values of $m$.

1) $n=1$ and $k=\frac{m}{2}$ is integer only if $m=4 p$ and $m=4 p+2$. If $m=4 p$, then $A=(2 \cdot 1000-1)^{2 p}+1$ and it follows by induction that $A$ is of the form $A=4 a+7$, so $A$ is congruent to 3 modulo 4 . We conclude that $A$ is not a perfect square. If $m=4 p+2$, then $A=(25 \cdot 80-1)^{2 p+1}+6$ and it follows by induction that $A$ is of the form $A=25 a+5$. Therefore $A$ is not a perfect square, because 5 divides $A$, but 25 does not.
2) $n=2$ and $k=m$ is integer for any $m$. Now $A=1999^{m}+6$. When $m=0$, we get $A=7$, which is not a sum of two squares.

When $m=1$, we obtain $A=2005=41^{2}+18^{2}$. If $m \geq 2$, then $A=(2 \cdot 999+1)^{m}+1$ and as above $A$ is congruent to 3 modulo 4 . On the other hand the sum of two perfect squares is congruent to 0,1 or 2 modulo 4 and so no solution exists in this case.
3) $n=2$ and $k=m$ is integer for any $m$. Now $A=(8 \cdot 250-$ $1)^{2 m}+6$, which can be written in the form $A=8 a+7$. Therefore $A$ is congruent to 7 modulo 8 , whereas a sum of three perfect squares is congruent to $0,1,2,3,4,5$ or 6 modulo 8 . Thus no solution exists in this case.
4) $n \geq 4$ and $k$ is integer for any $m$. Now $A=\left(1999^{m 2^{n-3}}\right)^{2}+$ $2^{2}+1^{2}+1^{2}$ and if $a_{1}=1999^{m 2^{n-3}}, a_{2}=2 \cdot a_{3}=a_{4}=1, a_{5}=a_{6}=$ $\cdots=a_{n}=0$, then $A=a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}$.

Answer: if $n=1$, no solution exists;

if $n=2$, there is an unique solution $m=1$;

if $n=3$, no solution exists;

if $n \geq 4$, any $m \geq 0$ is a solution.
