Show that if the difference of two consecutive cube numbers is a square number ($\displaystyle (k+1)^3-k^3=n^2$) then there exists two integers $\displaystyle a$ and $\displaystyle b$ for which $\displaystyle n=a^2+b^2$.
Show that if the difference of two consecutive cube numbers is a square number ($\displaystyle (k+1)^3-k^3=n^2$) then there exists two integers $\displaystyle a$ and $\displaystyle b$ for which $\displaystyle n=a^2+b^2$.
This looks like an interesting problem!
If $\displaystyle (k+1)^3-k^3=n^2$ then $\displaystyle 3k^2 + 3k -(n^2-1) = 0$. For that quadratic equation in k to have an integer solution, the discriminant $\displaystyle 9+12(n^2-1) = 3(4n^2-1)$ must be a square. So let $\displaystyle 4n^2 - 1 = 3m^2$, and hence $\displaystyle (2n)^2 - 3m^2 = 1$. The solution to that Pell's equation comes from convergents to the continued fraction expansion of $\displaystyle \sqrt3$. The j'th solution $\displaystyle (k_j,n_j)$ is given by $\displaystyle 2n_j+(2k_j+1)\sqrt3 = (2+\sqrt3)^{2j+1}$.
The solutions $\displaystyle n_j$ turn out to be sums of consecutive squares, satisfying the equation $\displaystyle n_j = p_j^2 + (p_j+1)^2$, where $\displaystyle p_j = \tfrac12(\sqrt{2n_j-1}-1)$. That raises two questions. (1) Why should $\displaystyle 2n_j-1$ be a square? (2) Why is that formula true? I can't answer either of those questions.
The first few values of k, n and p are given in this table (entries taken from the Sloane sequences A001921, A001570 and A001571).
$\displaystyle \begin{array}{r|r|r}k&n&p\\ \hline 0&1&0\\ 7&13&2\\ 104&181&9\\ 1455&2521&35\\ 20272&35113&132\\ 282359&489061&494\\ 3932760&6811741&1845\end{array}$
1.) $\displaystyle 2n_j-1 $ square implies $\displaystyle n_j = 2t^2+2t+1 $ for some $\displaystyle t $ (I leave out my work ).
We also know $\displaystyle n_j = \frac{(2+\sqrt{3})^{2j+1}-(2k_j+1)\sqrt{3}}{2} $.
Maybe it's possible to use the latter formula to derive the desired relation... I save this for another day.
2.) Does $\displaystyle n_j = p_j^2 + (p_j+1)^2$, where $\displaystyle p_j = \tfrac{1}{2}(\sqrt{2n_j-1}-1)$?
This can be shown true by simple algebra.