# Integer solutions of $x^3-x+9=5y^2$

What are the solutions in integers of $x^3-x+9=5y^2$?

[Source: Hungarian competition problem]

• $y$ has to be odd, do you see why? – imranfat Oct 18 '14 at 4:17
• Y has to be odd and also, it must be a multiple of 3, Let me find more restrictions – Dinesh Oct 18 '14 at 4:39
• I Think there are no integer solutions. Maybe proving by indefinite decent. – Dinesh Oct 18 '14 at 4:46
• Mod $5$, $(x-1)x(x+1)\equiv1$. So three consecutive integers multiply to $1$ mod $5$. This forces $x$ to be $2$ mod $5$. – alex.jordan Oct 18 '14 at 5:47
• And examining the possible residues mod $8$ on both sides, the only possiblity that the two sides have in common is $5$, which can only happen if $x\equiv4$ mod $8$. So together with my last comment, $x\equiv12$ mod $40$. – alex.jordan Oct 18 '14 at 6:49

If $x$ were odd, then we would have $x^3 \equiv x \pmod {8}$. But $5y^2 \equiv 1\pmod{8}$ has no solutions, so $x$ is even.

We have $(x-1)x(x+1) = 5y^2 - 9 \equiv 1\pmod{5}$. We have $2\cdot 3\cdot 4 \equiv -1\pmod{5}$, so we must have $x\equiv 2\pmod{5}$.

Finally, we observe that $x^3-x$ is divisible by $3$, so $y$ is divisible by $3$, so $x^3-x$ is divisible by $9$. However, $5y^2 \equiv 9 \pmod{27}$ has no solutions, so $x^3-x$ is divisible by $9$, but not $27$. This implies that either $x+1$ is not divisible by $3$, or it is divisible by $9$, but not $27$.

In the former case, we have $x+1 \equiv 3\pmod{5}$. In the latter, $\frac{x+1}{9} \equiv 2\pmod{5}$. Since $x+1$ is odd, in both cases there is a factor of $x+1$ that is in $\{2,3\}\pmod{5}$, but is not divisible by $2$ or $3$. That implies that there exists a prime factor $p\neq 2,3$ of $x+1$ such that $p\in \{2,3\}\pmod{5}$.

So $p$ is not a square$\pmod{5}$. By quadratic reciprocity, $5$ is not a square$\pmod{p}$. But we have $5y^2 - 9 \equiv 0 \pmod{p}$, so $5\equiv (3/y)^2\pmod{p}$, contradiction.

We conclude that there are no solutions.

This is the best I could do so far:

$$x^3-x+9=5y^2$$

Let $$x=247$$

Then

$$247^3-273+9=5y^2\implies y^2=3013797$$

Which gives $$y=1736.02909\approx 1736$$

This is the closest I've got so far to an integer for y.

The problem is even such small decimals give to large difference (in this case it's only 5). Im sharing this because it mighty help maybe also there is no easy solution (no perfect solution too). But after 1 hours of work this is the nearest I have seen.

Also, if you didnt know

$$y^2=\frac{x^3-x+9}{5}$$

$$y^2$$ is a integer

when $$x$$ is 7,17,27,37,.........,1127,.........,18887,etc

(means when the value x has a 7 as the last digit)

So this will allow you to narrow your Search.

• A different kind of a near miss is the following. If $x=37$, then $$x^3-x+9=50625=5^4\cdot3^4.$$ – Jyrki Lahtonen Oct 18 '14 at 9:31
• @JyrkiLahtonen . What do you mean? $y=\sqrt{5^3 \cdot 3^4}$ is not an integer. – M.S.E Oct 18 '14 at 9:48
• I said it's a near miss - not a solution. This time in terms of prime factorization as opposed to difference in absolute value. – Jyrki Lahtonen Oct 18 '14 at 10:07
• @JyrkiLahtonen oh sorry , yes I understand :) – M.S.E Oct 18 '14 at 10:12