<s>[INST] Diophantine equation $x^3=a^2+b^2+c^2$ Does anyone know  if a formula exists to obtain all solutions of the above Diophantine equation? All numbers integers.
Addendum: After seeing the answer from Tito Piezas III, I reconsidered the above equation and came up with an original solution that applies to two consecutive cubes when one of the cubes is equal to two squares. Solutions for three consecutive cubes exist, when the middle cube is equal to two squares, but I regret to say that I could not find a general solution for the third cube.
$[(a^2+b^2) +1]^3= [a(a^2+b^2)+a]^2+[(a^2)b+b+b^3]^2+[a^2+b^2+1]^2$, all numbers positive integers and $a>b$.
 [/INST] For any positive integer $k>2$, the kth power of the sum of two squares is the sum of three squares,
$$x^2+y^2+z^2 = (a^2+b^2)^k$$
thus,
$$a^2(a^2+b^2)^2 + (2ab^2)^2 + (a^2-b^2)^2b^2  = (a^2+b^2)^3$$
$$(a^4-b^4)^2 + (4a^2b^2)^2 + (2ab(a^2-b^2))^2 = (a^2+b^2)^4$$
$$a^2(a^2+b^2)^4 + (4a^3b^2-4ab^4)^2 + (a^4b-6a^2b^3+b^5)^2 = (a^2+b^2)^5$$
and so on. Similarly, for $k\geq2$, the kth power of the sum of three squares is itself the sum of three squares. Thus,
$$(a^2-b^2-c^2)^2 + (2ab)^2 + (2ac)^2 = (a^2+b^2+c^2)^2$$
$$(a^3-3ab^2-3ac^2)^2 + b^2(-3a^2+b^2+c^2)^2 + c^2(-3a^2+b^2+c^2)^2 = (a^2+b^2+c^2)^3$$
and so on. 
Note: For $k>2$, this does not give all solutions, but at least you have formulas. For more details, see Sums of Three Squares.
</s>