
> 
> 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?



Representing $x^3-2$ as a sum of two squares
The answer is similar to one provided [here.](https://artofproblemsolving.com/community/c6h2007167p14224750) The approach is elementary and proves stronger fact that it can be expressed as sum of two coprime squares.


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.


