# Representing $x^3-2$ as a sum of two squares

Prove that there exist infinitely many integers $$x$$ such that integer $$P(x)=x^3-2$$ is a sum of two squares of integers.

Ideally, I am looking for a proof method that also applies for other $$P(x)$$, such as, for example, $$P(x)=x^3+x+1$$.

For $$x=4t+3$$, $$P=(4t+3)^3-2$$ is $$1$$ modulo $$4$$. By a well-believed (but difficult) Bunyakovsky conjecture, $$P$$ is a prime infinitely often, and every prime that is $$1$$ modulo $$4$$ is a sum of two squares.

To find an unconditional proof, it suffices to find polynomials $$A(t)$$, $$B(t)$$ and $$C(t)$$ with rational coefficients such that $$A(t)^2 + B(t)^2 = C(t)^3-2$$. Are there any good heuristics to find such polynomials? Is there any computer algebra system that helps to guess a solution of a polynomial equation over $$Q[t]$$?

One way to guess $$C(t)$$ is to form a set $$S$$ of all integers up to (say) $$10^5$$ that are sums of two squares, and look for polynomials $$C(t)$$ such that $$C(t)^3-2$$ belong to $$S$$ for all small $$t$$. I then checked all polynomials of degree up to $$4$$ and coefficients up to $$12$$, and found, for example, a polynomial $$D(t)=3 + 8 t + 12 t^2 + 8 t^3 + 4 t^4$$ such that $$D(t)^3-1$$ is always a sum of two squares. But no $$C(t)$$ found in this range, and increasing the degree and/or coefficients makes the enumeration infeasible. Are there methods to find a polynomial with all values in the given set, that are better than enumeration?

• As a side note, your $D(t)^3-1$ factors as $a(t) b(t) \overline{a}(t) \overline{b}(t)$ where $a(t) = t^2+2t+1+i$, $b(t) = 4t^4+8t^3+(12+2i)t^2+(8+2i)t+(3+2i)$, and the bar is complex conjugate. If you write $a(t) b(t) = u(t) + i v(t)$, then $u(t)^2+v(t)^2 = D(t)^3-1$. Unfortunately, I have no ideas about the main question. Dec 2, 2021 at 17:39
• One should be able to obtain a lower bound which tends to infinity, but not an asymptotic formula, for the number of integers $x$ such that $x^3 - 2$ is a product of at most $r$ primes (for some reasonable $r$, like $r = 11$ I think suffices), each of which is congruent to 1 mod 4. Each such number is then a sum of two squares. Dec 2, 2021 at 19:05
• @ Stanley Yao Xiao - do you have any reference to this result? I found paper by H.-E. RICHERT "SELBERG'S SIEVE WITH WEIGHTS" that, under some natural conditions on P, proves that P(n) has a bounded number of prime factors infinitely often. However, how to add the condition that all these factors are congruent to 1 modulo 4? Dec 13, 2022 at 18:40

We consider the product $$(n+2)(n^3-2)$$ which is equal to $$n^{4}-2n+2n^3-4$$. Now we observe that $$(n+2)(n^3-2)=(n^2+n-7)^2+(13n^2+12n-53).$$ Proceeding as shown in the link we can easily get that $$13n^2+12n-53$$ is a perfect square for infinitely many $$n\equiv 3\pmod{4}$$ with first solution as $$13(3^2)+12(3)-53=10^2$$. If one chooses such a $$n$$ then clearly $$n^3-2$$ doesn't have any prime divisor of form $$4k+3$$ as $$\gcd(n^2+n-7,13n^2+12n-53)\mid 25\cdot 59$$ and $$59$$ doesn't divide $$n^3-2$$ if one looks at the general solution of the equation. Since, $$n^3-2$$ doesn't have any prime divisor of form $$4k+3$$ and $$n\equiv 3\pmod{4}$$ we can infer from the folklore result that it can be expressed as sum of two coprime squares.
• Alternative way to prove along the same lines is to set $n=m^2+2$ and notice that $$(m^2+2)^3-2 = (m^3 + 3m)^2 + (3m^2 + 6).$$ Then solutions to $3m^2 + 6 = k^2$ (starting with $(m,k)=(1,3)$) will give required $n$. Dec 2, 2021 at 19:26
• @MaxAlekseyev, yes, and then applying $m'=2m+k$, $k'=3m+2k$ gives larger solutions.
One more way to solve the problem. Let $$x = 4t + 3$$. Then $$x^3 - 2 = 16t^2(4t + 9) + (108t + 25).$$ The system $$4t + 9 = a^2 \qquad 108t + 25 = b^2$$ has infinitely many solutions. It is reduced to the equation $$b^2 - 27a^2 = - 218$$. Also we can consider a system $$4t + 9 = ka^2 \qquad 108t + 25 = kb^2$$ with $$k$$ representable as a sum of two squares. It is reduced to the equation $$b^2 - 27a^2 = - \frac{218}{k}$$. There are solutions for $$k = 109$$.