<s>[INST] how do you solve $a^2+b^2+c^2=d^3$ let $ a,b,c,d$ be 4 integers such that $\gcd(a,b,c,d)=1$. How do you find the integral solutions of the equation: $$a^2+b^2+c^2=d^3$$
 [/INST] For the equation:
$$x^2+y^2+z^2=r^3$$
Will make a replacement that formula was compact.
$$c=2(q-p-s)t$$
$$d=s^2+t^2-q^2-p^2+2p(q-s)$$
$$k=p^2+t^2-q^2-s^2+2s(q-p)$$
$$n=p^2+t^2+s^2-q^2$$
$$j=p^2+s^2+t^2+q^2-2q(p+s)$$
$p,s,t,q$ - integers asked us. Then decisions can be recorded.
$$x=dn^2+2cnj-dj^2$$
$$y=cj^2+2dnj-cn^2$$
$$z=k(n^2+j^2)$$
$$r=n^2+j^2$$
</s>