Find all positive integers $n$ for which $\dfrac{x^n + y^n + z^n}2$ is a perfect square, whenever $x$, $y$, and $z$ are integers such that $x + y + z = 0$.

I don't even know where to start.

  • 2
    $\begingroup$ This question is problem 3 from the USAMTS 2016-17 Round 1 problem set. This question will remain locked with answers temporarily deleted until the submission deadline of 17 October 2016 has passed. $\endgroup$
    – user642796
    Sep 13, 2016 at 11:42

2 Answers 2


I have no complete answer, but a start (as you wanted to know where to start). For $n=1$ we have that $(x^1+y^1+z^1)/2=0$ is a perfect square for all $x,y,z$ with $x+y+z=0$. So we may assume $n\ge 2$. Now choose, say, $(x,y,z)=(1,1,-2)$. Then $x+y+z=0$ and $$ \frac{x^n+y^n+z^n}{2}=\frac{2+(-2)^n}{2}. $$ This can never be a perfect square for all odd $n>1$, because it is negative in this case. Also for even $n$ this is rarely a perfect square, but it can happen, namely for $n=4$. This is clear, because for $n=4$ we have, with $z=-x-y$, $$ \frac{x^4+y^4+z^4}{2}=\frac{2x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + 2y^4}{2}=(x^2 + xy + y^2)^2, $$ which is indeed always a perfect square.

  • $\begingroup$ Actually, your example $(1,1,-2)$ shows that you have found all solutions. $9$ is the only perfect square of the form $2^n+1$. $\endgroup$
    – sTertooy
    Sep 13, 2016 at 9:40
  • $\begingroup$ Yes, that's a good point. I was hoping that the OP would try this. $\endgroup$ Sep 13, 2016 at 9:43
  • 2
    $\begingroup$ See usamts.org/Tests/Problems_28_1.pdf Problem 3. The OP is trying to get others to do their work for them. $\endgroup$
    – Airdish
    Sep 13, 2016 at 10:00

Leading on from Dietrich's answer, let's take $(x,y,z)=(1,1,-2)$ and consider even $n$ of the form $n=2k$, $k \geq 2$.


Suppose $1+2^{2k-1}$ is a perfect square. It is odd, so


$$\iff 2^{2k-1}=4l^2+4l$$

$$\iff 2^{2k-3}=l(l+1)$$

Since either $l$ or $l+1$ is odd, and $2^{2k-1}$ contains only even factors, it must be that $l=1$, $l+1=2$ and $k=2$.

i.e. the only cases are $n=0,4$ found by Dietrich above, who did all the hard work.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .