Say some integer $n$ is not sum of two cubes in the integers, then I want to show that there exists $k$ in positive integers such that $x^{3} + y^{3} \equiv n\pmod{k}$ is not solvable.

All I seem to know regarding even vicinity of such problems are following:

  1. If $n$ is not sum of two cubes in integers, then exists an integer $\theta(n)$ such that $n\theta(n)$ is sum of two cubes.

  2. Any number $n$ is sum of two cubes in integers if and only if following condition is satisfied: $$\exists m \mid n ,\quad n^{1/3} \leq m \leq 4^{1/3} n^{1/3}$$ such that $( m^{2} - \frac{n}{m} ) = 3l$ and $(m^{2} - 4l)$ is a perfect square.

May be there is counterexample here, i.e. exists $n$ which is not sum of two cubes yet the congruence equation $x^{3} + y^{3} \equiv n\pmod{k}$ is solvable $\forall k \in\mathbb{N}$. Any help is appreciated.

  • 1
    $\begingroup$ all your previous sentence says that any number is sum of two cubes modulo 3. My last sentence is asking for a counter-example to my first statement which is " If n is not a sum of two integer cubes, then there must be a integer k such that n is not sum of two cubes modulo k".. $\endgroup$ Sep 17, 2019 at 3:56
  • $\begingroup$ I think you have the question down now.. $\endgroup$ Sep 17, 2019 at 4:06
  • 1
    $\begingroup$ Now that you have started using this notation, lets avoid $\eta$(n) because that is taken by something else regarding this problem. Another thing is that $\eta$(n) is not unique. $\endgroup$ Sep 17, 2019 at 4:42
  • $\begingroup$ any two numbers not congruent in every mod are not equal. $\endgroup$
    – user645636
    Sep 17, 2019 at 14:50
  • $\begingroup$ If you are satisfied with one of the answers, Humble, I encourage you to "accept" it by clicking in the check mark next to it $\endgroup$ Sep 19, 2019 at 1:32

2 Answers 2


$$\left({17\over21}\right)^3+\left({37\over21}\right)^3=6$$ $x^3+y^3=6$ has no solution in integers, positive, negative, or zero (exercise for the reader), but the displayed equation shows there's a solution to $x^3+y^3\equiv6\bmod k$ for every $k$ relatively prime to $21$.

Now $x^3+y^3\equiv6\bmod3$ has the solution $x=y=0$, and $x^3+y^3\equiv6\bmod7$ has the solution $x=3$, $y=0$.

This almost takes care of things, but $x^3+y^3\equiv6\bmod9$ has no solution, so this is really close-but-not-quite.

BUT here's one that works. $$\left({7\over3}\right)^3+\left({11\over3}\right)^3=62$$ $x^3+y^3=62$ has no solution in integers, positive, negative or zero, but the display shows there's a solution to $x^3+y^3\equiv62\bmod k$ for every $k$ relatively prime to $3$. And $2^3+0^3\equiv62\bmod{27}$, together with an application of Hensel's Lemma, takes care of values of $k$ that are powers of $3$. Then the Chinese Remainder Theorem gives solutions for all $k$.


$n=20$ is a counterexample (turns out to be the smallest positive one, assuming negative cubes allowed).

Theorem 2.1 in the paper [found by @Mason] states that $x^3+y^3\equiv 20\pmod{k}$ is solvable for each $k$. [UPDATE: Similarly to the answer by Gerry Myerson, we have $20=(1/7)^3+(19/7)^3$, so we're left to deal with $k$ a power of $7$, which is done using Hensel's lemma and the solution $x=6,y=0$ for $k=7$.]

It remains to show that $20$ is not a sum of two integer cubes. Here is an algorithmic recipe. Suppose $n=x^3+y^3=(x+y)(x^2-xy+y^2)$. The second factor is positive, hence $d=x+y$ is a positive divisor of $n$, and we have $n/d=3x^2-3dx+d^2$. This has an integer solution $x$ if and only if $n/d-d^2$ is a multiple of $3$ and the discriminant is a square, i.e. iff $(4n/d-d^2)/3$ is a square of an integer. Examining the divisors of $20$ this way, we're done.

  • $\begingroup$ I don't see where Mason states that thing you were mentioning. I am sure existence of rational solution (like in example below) will do it for us. $\endgroup$ Sep 17, 2019 at 18:33
  • $\begingroup$ I deleted the original comment where I brought up this paper. It seemed like a duplication of data (now that it's in the answer above) and I want to make an effort to keep the website uncluttered. I really dislike having to read long comment threads hunting for valuable content. If you delete your comment above then I'll delete this one: It doesn't seem to add much value to this page, right? $\endgroup$
    – Mason
    Sep 17, 2019 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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