If $m^2 = (a+1)^3 - a^3$, then $m$ is the sum of two squares. Prove that:
$$\text{If} \space m^2=(a+1)^3-a^3\text{ where}\space m,a\in\mathbb{N} \implies \exists c,d \in\mathbb{N}\space \text{ such that}\space m=c^2+d^2.$$
Maybe it is wrong, if it is let me know why. I really need answer of this question.
(I asked this question in Edit of this link but I need to find answer soon so I just  ask it again here.)
Edit (and hint): It has an answer like $m = n^2+(n+1)^2$ but I don't know how to find this n for m from above equation.
 A: The sequence of such $m$ is oeis.org/A001570 and there we learn that $m$ is a sum of consecutive squares, which is more than we need.
oeis.org/A001570 points to this note:

Victor Thebault, Consecutive Cubes with Difference a Square, The American Mathematical Monthly, Vol. 56, No. 3 (Mar., 1949), pp. 174-175.

There we learn that $m^2 = (a+1)^3 - a^3 = 3a^2+3a+1$ is equivalent to $(2m)^2-3(2a+1)^2=1$. Indeed, $(2a+1)^2=4a^2+4a+1$ and so $4m^2=3(2a+1)+1$. This is a Pell equation $u^2-3v^2=1$, with $u=2m$ and $v=2a+1$.
We also learn in that note that $m=(x+1)^2+x^2$ reduces to the same Pell equation $4r^2-3s^2=1$, but no details are given. These are left as an exercise. :-)
A: So, if $(2m)^2-3y^2 = 1$, then:
$$4m = (2+\sqrt 3)^l + (2-\sqrt 3)^l$$
for an odd integer $l$.
But $2+\sqrt 3 = \frac{(1+\sqrt 3)^2}2$, so we can rewrite this as:
$$2^{l+2}m = a^{2l} + b^{2l}$$
Where $a = 1+\sqrt 3$, $b=1-\sqrt 3$.  Noting that, since $l$ is odd and $ab=-2$:
$$2^{l+1}=(-2)^{l+1} = -2(ab)^l = -2a^lb^l$$
we can subtract $2^{l+1}$ from both side and get that:
$$2^{l+2}m - 2^{l+1} = a^{2l} + 2a^lb^l + b^{2l} = (a^l + b^l)^2$$
But $a^l+b^l$ is an integer, so $2^{l+2}m - 2^{l+1}$ is a square. Since $l$ is odd, $2^{l+1}$ is a square, so $2m-1$ must be a square.
That is, $2m = z^2 + 1$ for some $z$, and hence $m = u^2 + (u+1)^2$ where $u = \frac{z-1}2$
A: Hint $ $ Times $\,4\,$ yields $\ 3\ (2a + 1)^2 = (2 m-1) (2 m + 1).\,$ The latter factors are coprime thus
$(1)\quad 2m - 1  = 3\ j^2,\,\  2 m + 1 = k^2\ \Rightarrow\ k^2 - 3 j^2 = 2\ \Rightarrow\ k^2 \equiv -1\pmod{\! 3}\ \Rightarrow\!\Leftarrow$ 
$(2)\quad 2 m - 1 = \ j^2,\quad 2 m + 1 = 3 k^2  \Rightarrow\ {\rm odd}\ j = 2 i +\! 1\ \Rightarrow\ m\, = \dfrac{j^2+1}2 = (i+\!1)^2\! + i^2\ $ 
Remark $\ \ $ The above technique, exploiting the structure of coprime factors of powers in a UFD, is ubiquitous in number theory. Perhaps the simplest example is the parametrization of primitive Pythagorean triples $\rm\ x^2 + y^2 = z^2\:.$ The essence of the proof is: $\rm\ x+y\ i,\ x-y\ i\ $ are coprime factors of a square in a UFD, so they must themselves be squares (up to unit factors). Therefore $\rm\ x + y\ i\ =\ (m + n\ i)^2 =\ m^2 - n^2 + 2\: m\: n\ i\:.\: $ Similarly one can solve low degree cases of Fermat's Last Theorem by employing analogous factorizations over certain rings of algebraic integers. For example, Gauss showed there are no solutions for exponent 3 by working in the ring of integers of $\rm\ \mathbb Q(\sqrt{-3})\:,\: $ and Dirichlet did similarly for exponent 5 using $\rm\ \mathbb Q(\sqrt{5})\:.$ Later Kummer generalized these techniques to handle all regular prime exponents by working over rings of cyclotomic integers. For a nice exposition see Ribenboim: 13 lectures on Fermat's last theorem. Weil nicely summarizes the essence of these techniques in his Number Theory, Ch.IV,S.VI,p.335:  


A: I find an answer for my questionn:
$$(a+1)^3-a^3 = m^2 \Rightarrow 3a^2+3a+1=m^2\Rightarrow 9a^2+9a+3=3m^2\Rightarrow (3a+1)^2+3a+2=3m^2$$ now we assume $3a+1 = t$ so:
$$t^2+t+1-3m^2 = 0 \rightarrow t = \dfrac{-1\pm\sqrt{1-4(1-3m^2)}}2\Rightarrow t=\dfrac{-1\pm\sqrt{12m^2-3}}2$$and $t>0$ so:
$$t=\dfrac{\sqrt{12m^2-3}-1}2$$
and we know $t$ is natural so:
$$\sqrt{12m^2-3} = k \Rightarrow k^2 = 3(4m^2-1)$$
so if we assume $p = 2m$ :
$$k^2=3(p^2-1)\Rightarrow 3(p-1)(p+1)\ ,\ gcd(p-1,p+1)=1$$ And the rest the of solution is like Bill's answer!
Obviously Bill's answer is better but it is mine:). 
