# Help with Arithmetic Progressions of Perfect Squares

Recently, I needed to generate all arithmetic progressions of three distinct perfect squares without any repeats. Mapping $$\left(x, y\right)$$ to such an arithmetic progression centered at $$\left(x^2+y^2\right)^2$$ with difference $$4xy\left(y^2-x^2\right)$$ for all $$\left(x,y\right)\in\mathbb{X}$$, where $$\mathbb{X}:=\left\{\left(x,y\right)\in\mathbb{N}^2:0, should solve this problem, as Fibonacci famously derived in his solution to the Congruum Problem. This means that for such an arithmetic progression $$\left(b^2-h, b^2, b^2+h\right)$$, there should a unique solution in $$\mathbb{X}$$ to the system of equations $$x^2+y^2=b,4xy\left(y^2-x^2\right)=h$$. However, in the case of the progression $$\left(205^2,425^2,565^2\right)$$, for which $$h=138600$$, these equations have no solution in $$\mathbb{X}$$, as can be seen in this Desmos plot. What mistake am I making?

• if $0< u<v<w$ and $u^2 + w^2 = 2 v^2,$ and $\gcd(u,v,w) = 1,$ then all are odd and $\left( \frac{w-u}{2},\frac{w+u}{2}, v \right)$ is a Pythagorean triple Jun 17, 2021 at 1:15

You state

• Mapping $$\left(x, y\right)$$ to such an arithmetic progression centered at $$\left(x^2+y^2\right)^2$$ with difference $$4xy\left(y^2-x^2\right)$$ for all $$\left(x,y\right)\in\mathbb{X}$$, where $$\mathbb{X}:=\left\{\left(x,y\right)\in\mathbb{N}^2:0, should solve this problem,

and what you found out is that you were wrong. I will try to explain what your error was.

It took me a while to figure out that you were using the mapping $$(x,y) \mapsto (2xy, y^2-x^2, x^2+y^2)$$

to generate Pythagorean triangles. What you have found out is that the above mapping does not generate all Pythagorean triangles.

This is the relationship between Pythagorean triples and arithmetic progressions of three perfect squares

$$u^2+w^2=2v^2 \implies a^2+b^2 = c^2 \text{ where } \left\{ \begin{array}{ccl} a &= &\frac 12(w-u)\\ b &= &\frac 12(w+u) \\ c &= &v \end{array}\right.$$

$$a^2+b^2=c^2 \implies u^2+w^2 = 2v^2 \text{ where } \left\{ \begin{array}{ccl} u &= & b-a\\ v &= & c \\ w &= & b+a \end{array}\right.$$

We find that

1. $$\quad h=v^2-u^2 = c^2 - (b-a)^2 = (a^2+b^2) - (b^2-2ab+a^2) = 2ab$$
2. $$\quad h=w^2-v^2 = (b+a)^2 -c^2 = (b+a)^2-(b^2+a^2) = 2ab$$

If we replace $$a$$ and $$b$$ with $$2st$$ and $$t^2-s^2$$ we get $$h = 4xy(y^2-x^2) \tag{A}$$

which is just what you got; and then you found that you could not solve $$4xy(y^2-x^2)=138600$$ for $$x$$ and $$y$$.

Let's go through the steps that led up to equation (A).

1. $$\quad (u,v,w)=(205, 425, 565)$$ yields $$(a,b,c) = (180, 385, 425)$$
2. $$\quad 4xy(y^2-x^2) = 138600$$

But you discovered that there is no solution to $$4xy(y^2-x^2) = 138600$$

We found the Pythagorean triangle that corresponds to the arithmetic progression $$(205^2, 425^2, 565^2)$$, so why can't we solve for $$x$$ and $$y$$?

The reason is that the mapping $$(x,y) \mapsto (2xy, y^2-x^2, x^2+y^2)$$ does not generate all Pythagorean right triangles!

A Pythagorean right triangle, $$(a,b,c)$$, is called primitive if $$\gcd(a,b) =1$$.

For example, $$(5,12,13)$$ is a primitive Pythagorean right triangle and $$(9, 12, 15)$$ is a Pythagorean right triangle, but it is not primitive since $$\gcd(9,12) \ne 1$$.

If you require that $$\gcd(x,y)=1$$ and $$x \not \equiv y \pmod 2$$ (one of $$x$$ and $$y$$ is even and the other is odd), then the mapping $$(x,y) \mapsto (2xy, y^2-x^2, x^2+y^2)$$ will generate all primitive Pythagorean right triangles.

If you put no restrictions on $$x$$ and $$y$$, you will generate other non primitive Pythagorean triangles but you won't generate all of them. For example, $$(2xy, y^2-x^2, x^2+y^2) = (12, 9, 15)$$ has no solution for $$x$$ and $$y$$.

So what you discovered is that $$(180, 385, 425)$$ is a non primitive Pythagorean triangle that cannot be expressed in the form $$(2xy, y^2-x^2, x^2+y^2)$$.

ASIDE: The arithmetic progression of squares $$(205^2, 425^2, 565^2)$$ is not "primitive" either since $$\gcd(205, 425, 565) = 5$$. Dividing by $$5$$, we get the primitive triple $$(u,v,w)=(41, 85, 113)$$, which gives us the primitive Pythagorean triangle $$(a,b,c) = (36, 77, 85)$$. We then have to solve $$4xy(y^2-x^2) = 85^2-41^2= 5544$$. We must have $$2xy = a = 36$$. So $$xy=18$$. The possible values for $$x$$ and $$y$$ are now $$(1, 18), (2, 9), (3, 6)$$. We also need $$y^2-x^2=b=77$$. So $$(x,y) = (2,9)$$. No. This answer cannot be manipulated to solve the original problem.

• Thank you for your answer. I followed everything up until the step $v^2=c^2$. If $c=2v$, why is $v^2$ not equal to $\frac{1}{4}c^2$ instead? Jun 17, 2021 at 4:05
• Thank you again for your help. Your edit fixed my previous concern, but now I am confused by the step $\frac{1}{2}\left(u^2+v^2\right)=w^2$. Regardless of that specific issue, though, I am still somewhat confused as to what you are saying with regards to the parametrization given in my question. Are you saying that I misinterpreted it and just need to use Pythagorean Triples directly to generate arithmetic progressions of squares? Jun 17, 2021 at 14:37
• @EvanBailey If $u^2, v^2$, and $w^2$ are in AP, then $v^2-u^2 = w^2 - v^2 \implies u^2 + w^2 = 2v^2$ For every such triplet $(u,v,w)$ there exists a Pythagorean triplet, $(a,b,c)$ related to each other as shown above and there are all sorts of ways out there to generate Pythagorean triplets. I had to reedit my answer one more time. I have some troubles processing text mentally and this particular problem set all of my dials to 11. Jun 17, 2021 at 23:50