4

The most common formula for generating Pythagorean triples is Euclid's, shown here as $$A=m^2-k^2\qquad B=2mk\qquad C=m^2+k^2$$ It generates all primitves but also generates trivals, doubles, square multiples, and doubles of square multiples of primitives. A variation of this is

\begin{align*} &A=(2n-1+k)^2-k^2&&=(2n-1)^2+2(2n-1)k\\ &B=2(2n-1+k)k &&=\phantom{(2n-1)^2+{}} 2(2n-1)k+2k^2\\ &C=(2n-1+k)^2+k^2 &&=(2n-1)^2+2(2n-1)k+2k^2 \end{align*} It generates no trivials and all primitives but also generates odd square multiples of primitives.

In the latter, if we let $\,n=1\implies \big(A=2k+1\quad B=2k^2 + 2k\quad C=2 k^2 + 2 k + 1\big),\,$ or $\,k-1\implies \big(A=4n^2-1\quad B=4n\quad C=4n^2+1\big)$ we get only primitives but not all primitives.

Is there a formula that genrates only and all primitives besides the one that generates the ternary tree? I doubt such a formula exists but I would love to see it if it does.

poetasis
  • 6,338
  • 2
    There probably isn't an algebraic formula, no. – Thomas Andrews Sep 21 '23 at 19:35
  • The homogeneity of the equation indicates it is most naturally studies as questions of pairs of rational integer $(x,y)$ with $x^2+y^2=1.$ This can be parameterized by the rational numbers, aside from $(-1,0).$ But the nature of a circle makes it very hard to get all the values without going to a projective geometry. – Thomas Andrews Sep 21 '23 at 19:45
  • 3
    If we insist that $\gcd(m,k) = 1$ and $m+k$ is odd, we do not get your imprimitives. – Will Jagy Sep 21 '23 at 19:45
  • @Will Jagy A counterexample of $, m+k,$ odd is $,G(6,3)=(27,36,45)=9\cdot(3,4,5).\quad$ We do know that there will be no imprimitives if $,(m,k),$ and $,\big((2n-1),k\big),$ have no common factors but I was hoping for a formula where all parameters produced primitives. – poetasis Sep 21 '23 at 19:59
  • So the traditional way to parameterize the rational points on the circle is start with a slope, $m.$ Then take the line $y=m(x+1),$ and find the second point on this line, other than $(-1,0),$ which is on the circle. So $$1=x^2+y^2=(1+m^2)x^2+2m^2x+m^2$$ or $$((m^2+1)x+(m^2-1))(x+1)=0,$$ which has $x=\frac{1-m^2}{m^2+1}$ and $y=\frac{2m}{m^2+1}.$ This is, of course, the source of the tradition formula. But we see that we miss the $(-1,0)$ case because there is no $m=\infty,$ which is necessary because, topologically, the circle is a projective line. – Thomas Andrews Sep 21 '23 at 20:00
  • 2
    poet, $\gcd(6,3) = 3...........$ – Will Jagy Sep 21 '23 at 20:02
  • See here for an introduction to the beautiful geometry behind the ternary tree. – Bill Dubuque Sep 22 '23 at 00:44

1 Answers1

1

As Will Jagy pointed out in his comment, Euclid's formula satisfies your criteria IF certain conditions are stated. The trick is to find a way to include those conditions in a formula, rather than having them stated independently. Here is as close as I can come; apologies if you think it is falls short of what you seek.

$$r:=2^a(2u-1); s:=2^{a+b}(2v-1); (a,b,u,v) \in \mathbb Z^+$$ $$ m:=\frac{r}{\gcd(r,s)}; k:=\frac{s}{\gcd(r,s)}$$ $$ A=|m^2-k^2|; B=2mk; C=m^2+k^2$$ It is possible to cram all of this into one set of formulas for $(A,B,C)$ in terms of the variables $(a,b,u,v)$ if necessary, but the typography would be horrible.

A limitation similar to $(a,b,u,v) \in \mathbb Z^+$ is (I believe) generally presumed, even if not expressly stated, in all such formulas for Pythagorean triples. The formulas arrived at here for the Pythagorean triples $A,B,C$ meet the criteria of Euler's formula in terms of completeness, ensure that one and only one of $m,k$ is even, and avoid any shared factors among $m,k$, hence among $(A,B,C)$, ensuring primitive triples.