# Triple Pythagorean with $a^2+b^2=c^4$

It is well known that there exist integer solutions to the equation $$a^2+b^2=c^2$$. For example, an explicit formula for integer values of $$a$$ , $$b$$ , and $$c$$ is

\begin{align}a&=2mn \\ b&=m^2-n^2 \\ c&=m^2+n^2.\end{align}

I want to find solutions to the equation $$a^2+b^2=c^4$$. However, I got $$a,b,c$$ in a general form that substitutes $$x$$ in integer and get $$a,b,c$$ in the integer. What should I do first? I'm very stuck!

Your equation, $$a^2 + b^2 = c^4$$, is the same as $$a^2 + b^2 = c^2$$, except that $$c$$ has been replaced with $$c^2$$. Thus you can find solutions by choosing $$m$$ and $$n$$ so that \begin{align} a&=2mn \\ b&=m^2-n^2 \\ c^2&=m^2+n^2. \end{align} But how can you make sure that $$c$$ is an integer? Easy: that last equation, $$c^2 = m^2 + n^2$$ says that $$m,n$$ and $$c$$ also form a Pythagorean triple. Thus you can find solutions with two new parameters, $$r$$ and $$s$$ such that \begin{align} m&=2rs \\ n&=r^2-s^2 \\ c&=r^2+s^2. \end{align} Substituting these in the first set of equations to find $$a$$ and $$b$$, you have \begin{align} a&=4rs(r^2-s^2) \\ b&=6r^2 s^2-r^4-s^4 \\ c&=r^2 + s^2. \end{align} For example, choosing $$r=2$$ and $$s=1$$ gives you $$a = 24$$, $$b=7$$, $$c=5$$ and, indeed, $$24^2 + 7^2 = 5^4$$.

• Finding any triplet where C is an odd square will satisfy the equation because the square root of C taken to the 4th power does is. Commented Mar 31, 2019 at 16:50

Whenever you have $$a^2+b^2=c^2$$ you also get $$(ca)^2+(cb)^2=c^4$$ -- does that count for you?

• +1, but are those all solutions? Commented Mar 22, 2019 at 3:10

Starting with any perfect square $$(x^2:x\ge 5)$$, you can find a triple, if it exists, where $$A^2+B^2=x^4$$ with a function that begins by solving Euclid's $$C$$ function for $$n$$. $$C=x^2=m^2+n^2\Rightarrow n=\sqrt{x^2-m^2}\text{ where }2\le m \lt x$$

To demonstrate we start with the smallest example with an existing $$C$$ that is a perfect square $$(7,24,25)$$ and we let $$n=\sqrt{25-m^2}$$ where $$2\le m \lt x.$$ (Note: $$x\gt m$$ because we want a natural number $$n$$. Whenever this function yields an integer and $$m>n$$ we have the $$m,n$$ we neet for a triple. Testing from $$2\le m \lt 5$$, we find

$$\sqrt{25-2^2}=\sqrt{21}\qquad \sqrt{25-3^2}=\sqrt{16}\qquad \sqrt{25-4^2}=\sqrt{9}=3$$

Note: only the last test yielded an integer $$4=m>n=3$$ which is what we need. $$f(4,3)\Rightarrow A=16-9=7\quad B=2*4*3=24\quad C=\sqrt{16+9}=5\qquad7^2+24^2=5^4$$

Some values of $$x$$ beget multiple triples such as where $$65^2-52^2,56^2\text{, and }60^2$$ yielded integers.

$$f(52,39)=(1183,4056,65)\quad f(56,33)=(2047,3696,65)\quad f(60,25)=(2975,3000,65)$$

The percentage of valid squares and total triples compared to $$X$$ varies with $$X$$. Here are sample counts of integers, valid squares, and triples (i,v,t) up to $$x$$: $$(5,1,1)\quad(10,2,2)\quad(50,18,20)\quad(100,42,52)\quad(500,268,386)\quad(1000,567,881)\quad(5000,3129,5681)\quad(10000,6449,12471)\quad(25000,16611,34835)\quad(50000,33882,75196)$$ Read: Between $$1$$ and $$1000$$ are $$567$$ integers that form $$881$$ triples where $$A^2+C^2=x^4$$.

Here is pseudocode for generating $$A^2+B^2=C^4$$ for all integers up to an input limit.

INPUT LIMIT

$$X=1$$ TO LIMIT

$$\quad M=2$$ TO $$X-1$$

$$\quad \quad N=SQRT(X^2-M^2)$$

$$\quad \quad$$IF $$N=INT(N)$$ AND $$M>N$$

$$\quad \quad \quad$$PRINT $$M^2-N^2$$ "," $$2*M*N$$ "," $$X$$

$$\quad \quad$$ENDIF

$$\quad$$NEXT M

NEXT X