# if $m^2 = a^3 - b^3$, then $m$ is the sum of two squares.

(Please read "Edit"s and see this.)

How could I prove that : $$\text{If} \space m^2=a^3-b^3\text{ where}\space m,a,b\in\mathbb{N} \rightarrow \exists c,d \in\mathbb{N}\space \text{ such that}\space m=c^2+d^2$$ thanks for helping

Edit: I told the person who gave me this question it's wrong, and he corrected it like this: $$\text{If} \space m^2=(a+1)^3-a^3\text{ where}\space m,a\in\mathbb{N} \rightarrow \exists c,d \in\mathbb{N}\space \text{ such that}\space m=c^2+d^2$$ It's such an easy question and I already know the answer.

Edit2:I though I know this question answer but after thinking I can't solve this, could any one help me to figure out how to solve this?(I hope it wasn't wrong like previous question, but if you think it's wrong please let me know,I need to solve this question for exam I wanna take from my students.)

Edit 3: the second question wasn't wrong and has been answered at this link.

• Does your definition of the set of natural numbers includes zero ? Commented Jan 16, 2012 at 19:07
• What is the source of the problem? Commented Jan 16, 2012 at 19:07
• @pedja it dose not matter
– Lrrr
Commented Jan 16, 2012 at 20:21
• @JonasMeyer I dont know some one ask this from me
– Lrrr
Commented Jan 16, 2012 at 20:22
• @péter-horváth Have a look at this question. Commented Sep 7, 2020 at 17:29

## 1 Answer

You cannot prove it because it is false.

Let $a=90$, $b=54$. Then $$a^3-b^3=571536=2^4\cdot3^6\cdot7^2$$ and hence $$m=2^2\cdot 3^3\cdot 7.$$ This cannot be written as the sum of two squares since it has prime factors congruent to $3$ modulo $4$ which appear to an odd power. (Violating Fermat's condition)

Edit: The smallest example occurs when we take $a=10$, $b=6$, as then $$a^3-b^3=784=(28)^2$$ so that $m=2^2\cdot 7$. This cannot be written as the sum of two squares since we cannot write $7$ as the sum of two squares.

• Nice solution! One can start from many $x$, $y$ such that $x^3-y^3$ is "bad" and multiply $x$ and $y$ by suitable $k$ so that $k^3(x^3-y^3)$ is a perfect square. This leads to the question whether $a$ and $b$ can be relatively prime. They can, for $71^3-23^3=588^2$, and $588$ is not the sum of two squares. Commented Jan 16, 2012 at 21:27
• @Eric: please read my Edit2 and if you can find out it's wrong tell me. tanks:)
– Lrrr
Commented Jan 19, 2012 at 12:53
• @AliAmiri: Yes this is true. It is not easy, but it is true. You are looking at Pells Equation, and the solutions for $m$ are given by the continued fraction expansion for $\sqrt{3}$, and you can rewrite this using a recurrence relation. Playing with this relation, you can eventually prove that if $m^2=(a+1)^3-a^3$, then we have $m=c^2+d^2.$ Moreover, we can actually show that these are consecutive squares. That is $m^2=n^2+(n+1)^2$ for some $n$. I think this deserves its own question, as you find some interesting answers there. Commented Jan 19, 2012 at 14:07
• @EricNaslund thanks to your kind help yes i have guess about $m=n^2+(n+1)^2$ but i don't have any idea how to prove this. and also i asked this question in new question.
– Lrrr
Commented Jan 19, 2012 at 14:15
• @AliAmiri: Yes, I accidently put the square Commented Jan 19, 2012 at 14:21