Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Prove $x^n + y^n = z^n$ has solutions for $x, y, z \in \mathbb{Z_3}$ only for odd $n$.

So for example, $1^2 + 2^2 = 5$ and $5$ doesn't have a square root, which means it doesn't have a solution.

I showed $0^n$ and $1^n$ remain $0, 1$ respectively for all $n$. But $2$ can be either $1 \mod 3$ if it's raised to an even power e.g. $4, 16, 64$, etc.

However, if it's raised to an odd power, the results are $2, 8, 32$, etc. and so it's $2 \mod 3$.

I am stuck on how to continue.

Can anything more be said about this? I also never noticed this interesting property.

share|cite|improve this question
I didn't understand your example: $\;1^2+0^2=2^2\;$ is a solution modulo three ... – DonAntonio Oct 3 '13 at 18:25
There are 3 possibilities for $x$, 3 for $y$, and 3 for $z$. What's stopping you from trying all the possibilities? – WillO Oct 3 '13 at 18:26
Hint: $2\equiv -1 \mod 3$ so $2^n\equiv 1$ for even $n$ and $2^n\equiv -1$ for odd $n$. – kedrigern Oct 3 '13 at 18:53
up vote 1 down vote accepted

Since $(3m+x)^n \equiv x^n (mod 3)$ We only have to think about $x,y,z$ are either $0,1,2$. Since $2^n \equiv (-1)^n (mod 3)$, if n is odd, $2^n \equiv 2$, and if n is even, $2^n \equiv 1$. It's clear that $1^n \equiv 1 (mod 3)$ and $0^n \equiv 0 (mod 3)$ Thus, there's no solution when n is even but when n is odd.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.