Can an integer that is $3\pmod 7$ be expressed as a sum of two cubes? I was going back through my past exams in a Discrete Mathematics Course and came across this problem which I failed to solve- Does there exist $x$ and $y$ s.t $x^3+y^3 \equiv 3\pmod 7$? Give a convincing proof of your assertion.
I went through some examples and couldn't find any such $x$ and $y$. My attempt was that of considering parity. For an integer which is $3\pmod 7$, it can be either even or odd. If it is even then either $x$ and $y$ must be even or $x$ and $y$ must be odd. Considering the even case, we get that $8a^3+8b^3 \equiv 3\pmod 7$. But This expression is always even and I wasn't really sure where to go from here. I feel like considering parity would be the right approach but I did similar things considering odds and other cases and couldn't gain any traction.
Any help would be appreciated.
 A: Note that $x^3\equiv0,\pm1\bmod7$ for any $x\in\mathbb Z$. So, $x^3+y^3=0,\pm1,\pm2\bmod7$, and hence, this is not possible.
A: The answer is no. For every integer $z$, $z^3 \mod 7=0,1,-1$. The sum of any two of these is not $3 \mod 7$.
A: Hint: Use Fermat little theorem:
If $7\nmid x$ then $$ x^6\equiv 1 \pmod 7 $$ and so $$ x^3\equiv \pm 1 \pmod 7 $$
A: Slightly more generally, you can check every combination of two numbers and see whether they satisfy the equation. Because you're dealing with $\mathbb Z_7$, there are only $7^2=49$ different such combinations, so it's rather easy, especially with a computer, to rule out all the possibilities with brute force.
A: Let's identify integers as $7n, 7n+1$ and so on. Since you only need to know the constants since the other are multiples of $7$, the constants will be cubes of $0$ to $6$. If I find the remainder from dividing by $7$, it'll be $1, 1, 6, 1, 6, 6$ which can't be added to $7n+3$ so it's impossible.
A: All the integral cubes are congruent to $0, 1, 6$ mod $7$.
Proof:
$0^3=0=0$ (mod $7$)
$1^3=1=1$ (mod $7$)
$2^3=8=1$ (mod $7$)
$3^3=27=6$ (mod $7$)
$4^3=64=1$ (mod $7$)
$5^3=125=6$ (mod $7$)
$6^3=216=6$ (mod $7$)
Since sum of any two (not necessarily distinct) members in the list $0, 1, 6$ must be congruent to $0, 1, 2, 5, 6$ mod $7$, it can't be $3$ mod $7$, so $7k+3$ is not the sum of two integral cubes for any integer $k$.
However, this is possible in positive rational numbers: $\left(\frac{20}{7}\right)^3+\left(\frac{37}{7}\right)^3=171$.
