If the difference of cubes of two consecutive integers is a square, then the square can be written as the sum of squares of two different integers. How can i prove the statement that if the difference of cubes of two consecutive integers is an integral power of 2, then the integer with power 2 can be written as the sum of squares of two different integers.
For example:
$$8^3 - 7^3 = 13^2 = 12^2 + 5^2$$
Any help appreciated.
Thanks.  

By expanding, we get $x^2=3n^2+3n+1$
Thus $4x^2-1=12n^2+12n+3=3(2n+1)^2=(2x-1)(2x+1)$
$gcd(2x-1,2x+1)=1$,
We have two cases.
Case 1: $2x-1$ can be written as $3k^2$
Hence 2x+1 is a perfect square and 3|(2x+1)-2. No solution.
Therefore $2x-1$ must be a perfect square. Let it be $(2a+1)^2$.
Then $x=2a^2+2a+1=a^2+(a+1)^2$ QED
Note: I came up with this solution myself, but it also turned out to be the official solution for the IMO Longlist problem. 
