Integer Solutions of the Equation $u^3 = r^2-s^2$ The question says the following:

Find all primitive Pythagorean Triangles $x^2+y^2 = z^2$ such that $x$ is a perfect cube.

The general solution for each variable are the following:
$$x=r^2-s^2$$
$$y=2rs$$
$$z=r^2+s^2$$
such that $\gcd(r,s) = 1$and $r+s \equiv 1 \pmod {2}$
In order to make $x$ a perfect cube, I shall have the equation $x=u^3=r^2-s^2$. However, I am stuck to find a general formula for such cubes. 
I know that a subset of the solutions might be the difference between two consecutive squares. This difference is always an odd integer. I can collect some examples such $14^2-13^2 = 27$ but I cannot give a formula for such type either.
Any ideas?

We can find one or more Pythagorean triples for any odd leg $\ge 3$using a function of $(m,A)$:
$$\text{We can let }n=\sqrt{m^2-A}\text{ where }\lceil\sqrt{A}\space\rceil\le m\le \frac{A+1}{2}$$
This is useful in finding $x^3+B^2=C^2$ because we can plug in any odd cube $(A)$ an make a small finite search of values based on $A$. We demonstrate with the first odd cube.
$$m_{min}=\lceil\sqrt{27}\space\rceil=\lceil 5.196152423\rceil=6\qquad \qquad m_{max}=\frac{A+1}{2}=\frac{28}{2}=14$$
Testing for $6\le m\le 14$, we find integers for $(m,n)=(6,3)\text{ and }(14,13)$
$$\text{For }(6,3)\quad A=6^2-3^2=27\quad B=2*6*3=36\quad C=6^2+3^2=45\qquad (3,36,45)$$
$$\text{For }(14,13), A=14^2-13^2=27, B=2*14*13=364,  C=14^2+13^2=365\quad (3,364,365)$$
Here are triples generated by the same algorithm(s) for other cubes
$$\text{For }5^3=125\qquad f(15,10)=(5,300,325)$$
$$\text{For }7^3=343\qquad f(28,21)=(7,1176,1225$$
$$\text{For }9^3=729\quad f(45,36)=(9,3240,3321)\qquad f(123,120)=(9,29520,29529)$$
$$\text{For }11^3=1331\qquad f(66,55)=(11,7260,7381)$$
