# Finding the all integer solutions

How to Find the all integer solutions for:

$$x+y+z=3$$ $$x^3+y^3+z^3=3$$

-
Wolframalpha finds these. –  Ragib Zaman Sep 26 '12 at 15:19
How far along did you get towards an answer? Knowing this might help people gauge the level to which they should pitch their answers. –  Rick Decker Oct 8 '12 at 13:43
We have $x^3+y^3=3-z^3$ and $x+y=3-z$. Since $x+y$ divides $x^3+y^3$, we conclude that $z-3$ divides $z^3-3$, and therefore $z-3$ divides $24$. Similar considerations apply to $x$ and $y$.
Remark: Let's throw in some number theory. It is a sometimes useful fact that $a^3$ is always congruent to $0$, $1$, or $-1$ modulo $9$. Thus if $x^3+y^3+z^3=3$, we must have $x^3$, $y^3$, and $z^3$ all congruent to $1$ modulo $9$. It follows that all of $x$, $y$, and $z$ are congruent to $1$ modulo $3$, and hence so are $x-3$, $y-3$, and $z-3$. The only divisors of $24$ that satisfy this condition are $1$, $4$, $-2$, and $-8$. So our only candidates for $x$, $y$, and $z$ are $4$, $7$, $1$, and $-5$.
Also useful is that $a^3$ is always congruent to 0, 1 or -1 mod 7. For $x^3 + y^3 + z^3 = 3$ we must have x, y, z congruent 1, 2 or 4 mod 7 so that $x^3, y^3, z^3$ are all congruent 1 mod 7. Hence 7 cannot feature in a solution. –  Adam Bailey Sep 27 '12 at 12:18