# Using Fermat's Little Theorem to solve a Diophantine equation.

How to prove that the equation $x^2+5=y^3$ has no integer solutions? I have proved the case when $x$ is odd. I used the fact $x^2\equiv 1 \pmod 4$ but how would you do for even $x$: the mod 4 analysis becomes useless. The problem is from Fermat Little Theorem section. But I do not know how apply it. Thanks

• You might find a solution here on page 2 - theorem 2.2 Commented Oct 29, 2012 at 22:09
• @OldJohn: your link doesn't seem to work for me (Google docs login...) but I think that it's Conrad's paper available here too. Commented Oct 29, 2012 at 22:14
• Yes - that is the paper. Never really understood the Google docs system for links, I'm afraid. Commented Oct 29, 2012 at 22:17

Here is a proof. First note that, $y$ cannot be congruent to $3$ modulo $4$. Indeed, had it been; then we would have had $$x^2 + 5\equiv y^3 \equiv27\pmod{4}\implies x^2 \equiv2\pmod{2},$$ a contradiction. With this in mind, rewrite the equation as, $$x^2+4 = y^3 - 1=(y-1)(y^2+y+1).$$ Now, we claim that right hand side always has a prime divisor of form $4k+3$. Indeed, if $y\equiv 0\pmod{4}$, then $y-1\equiv3\pmod{4}$, hence it has such a prime divisor; and if $y\equiv1$ or $y\equiv2$ modulo $4$, $y^2+y+1$ has a prime divisor congruent to $3$ modulo $4$.
Equipped with the following well-known lemma, we are done. If $p\equiv 3\pmod{4}$ a prime, then $$p\mid x^2+y^2 \implies p\mid x \ \text{and} \ p\mid y.$$ Applying the lemma we conclude for this prime divisor that $p\mid x^2+2^2$ implies $p \mid 2$, contradiction. Done.