19

Is it true that all elements in $\mathbb{Z}/n\mathbb{Z}$ are representable as the sum of a square and a cube?

Example: ($n=7$)

$0 \equiv 0^2+0^3 \left( \text{mod } 7 \right)$

$1 \equiv 1^2+0^3 \left( \text{mod } 7 \right)$

$2 \equiv 1^2+1^3 \left( \text{mod } 7 \right)$

$3 \equiv 2^2+3^3 \left( \text{mod } 7 \right)$

$4 \equiv 5^2+0^3 \left( \text{mod } 7 \right)$

$5 \equiv 2^2+4^3 \left( \text{mod } 7 \right)$

$6 \equiv 0^2+6^3 \left( \text{mod } 7 \right)$

It is trivial to see that $0$, $1$, $2$, and $\left( n-1 \right)$ can be represented as the sum of a square and a cube. This is accomplished when considering the combinations like $\left( 0^2+0^3 \right)$, $\left( 0^2+1^3 \right)$, $\left( 1^2+0^3 \right)$, etc.

How can I prove this?

EDIT:

There is a slightly stronger version which states that all elements can be written as $a^2+b^3$, where $a \ne b$. I have verified this stronger version up to $n=1000$.

Bruno Joyal
  • 54,711
Ryan
  • 1,389
  • how do you get $7$ as the sum of a square and a cube in just $\mathbb{Z}$? – Daniel Montealegre Sep 11 '13 at 22:34
  • Ryan, the suggestion seems to be that you are doing this in the ring of integers $\pmod n.$ If so, could you display all your solutions for $n=20,$ show all $j \equiv x^2 + y^3 \pmod {20}$ with $1 \leq j \leq 19?$ – Will Jagy Sep 11 '13 at 23:01
  • @WillJagy I have just displayed my solutions for $n=7$ at your earlier request. Any reason to prefer $n=20$ over $n=7$? – Ryan Sep 11 '13 at 23:05
  • No, no important reason. – Will Jagy Sep 11 '13 at 23:06
  • 2
    By the Chinese Remainder Theorem, it suffices to decide this problem with $n$ a prime or prime power. It is very likely true for all primes, as half the residues are squares, and at least a third of residues are cubes. Less sure about $n=p^2, n=p^3,$ etc. – Will Jagy Sep 11 '13 at 23:10
  • 1
    Also, representing $n-2$ will not always be obvious. – Will Jagy Sep 11 '13 at 23:26
  • Ah, yes, you are right. I was thinking it was somehow implied by symmetry, but it doesn't work because $x^2$ and $x^3$ have different parity. – Ryan Sep 11 '13 at 23:50
  • 2
    @WillJagy If we have a solution modulo $p$, I think we can get solutions modulo $p^k$ from Hensel's lemma. Depending on whether $p\neq2$ or $p\neq3$, hold $x$ or $y$ fixed and lift the other variable. Right? – Chris Culter Sep 12 '13 at 00:08
  • There is also a multivariable Hensel lemma. – Martin Brandenburg Nov 29 '13 at 10:06
  • This is also 2012 International Mathematical Olympiad Shortlist N7 – katana_0 Jul 23 '18 at 18:28

1 Answers1

22

I prove it for $n=p$ a prime. After checking the cases $p=2$ and $p=3$ by hand, I suppose that $p>3$. Let $a \in \mathbf F_p$, we want to show that $a$ is the sum of a square and a cube. Without loss of generality we suppose $a \neq 0$. Let $E_a$ be the curve $$y^2 = x^3 +a.$$ over $\mathbf F_p$. Since $a \neq 0$, $E_a$ is an elliptic curve over $\mathbf F_p$. We have the following theorem (the so-called Hasse bound, or the Riemann hypothesis for elliptic curves over finite fields):

Theorem (Artin - Hasse) : Let $E/\mathbf F_p$ be an elliptic curve. Then $$|\#E(\mathbf F_p) - p - 1| \leq 2 \sqrt p.$$

Corollary: If $p>3$, then $\#E(\mathbf F_p)>1$, i.e. $E$ has a nontrivial rational point over $\mathbf F_p$.

Proof: If $\#E(\mathbf F_p) = 1$ then $p \leq 2 \sqrt p$ implies $p\leq 4$.

Corollary: If $p$ is prime, then every element of $\mathbf Z/p\mathbf Z$ is the sum of a cube and a square.

Proof: If $(x_0, y_0)$ is a nontrivial point on $E_a$ then $y_0^2 + (-x_0)^3 = a$.

Remark: Your other question, concerning the existence of a solution with $x_0 \neq y_0$, can be answered positively using Bézout's theorem. The line $y=x$ intersects $E_a$ in at most $3$ points, so for $p$ large enough, Artin-Hasse still guarantees the existence of a solution with $x_0 \neq y_0$. (I'll let you figure out the right bound on $p$.)

Bruno Joyal
  • 54,711
  • 3
    For prime powers you can show that mod $p$ there is a solution that is not $(0,0)$ if $a \neq 0$ or $p \ge 11$. Then for any lift of $a$ mod $p^n$ you can lift that solution mod $p^n$ – mercio Sep 27 '13 at 16:16
  • 3
    Dear @mercio I think that you are right, but I suppose one might have to be careful for $p=2$ and $p=3$. If you'd like to work out the details, feel free to edit them into my post. Regards, – Bruno Joyal Nov 15 '13 at 05:00
  • 1
    The case of primes powers for $p < 11$ needs extra care. A solution covering all prime powers is in my answer to http://mathoverflow.net/questions/134352/the-modular-arithmetic-contradiction-trick-for-diophantine-equations?rq=1 – KCd May 21 '14 at 00:49
  • @KCd Very nice, thanks! – Bruno Joyal Jun 06 '14 at 02:49