I am hesitant because I have asked this question before in a different form here. In 2009, I knew nothing about Pythagorean triples, not even Euclid's formula. In my ignorance, I did a brute force search, and the patterns I saw led to a formula for generating them. Years later, when I learned about Euclid's formula, it was confusing and I questioned it here. I'm an amateur but what I have found has kept me plodding along for over a decade.
I developed a formula that should have been discovered in the $2300$ years since Euclid. It generates the subset of triples where $GCD(A,B,C)$ is an odd square and this includes all primitives––without the trivials, the doubles and the even-square multiples of Euclid's formula. The formula is like Euclid's $ \quad A=m^2-k^2,\quad B=2mk,\quad C=m^2+k^2\quad$ but, as I discovered later, with $\space m\space$ replaced by $\space (2m-1+k)\space$ and this is why I show them both with a $\space k.\space$ This formula generates non-trivial triples for every pair of natural numbers $(n,k)$ and very few non-primitives. Here is
\begin{align*} A=(2n-1)^2+ &\quad 2(2n-1)k \\ B= \qquad &\quad 2(2n-1)k+ \quad 2k^2\\ C=(2n-1)^2+ &\quad 2(2n-1)k+ \quad 2k^2\\ \end{align*} It produces "sets" of triples where non-primitives like $\space(27,36,45)\space$ are in predictable/avoidable locations. \begin{array}{c|c|c|c|c|c|c|} n & k=1 & k=2 & k=3 & k=4 & k=5 \\ \hline Set_1 & 3,4,5 & 5,12,13& 7,24,25& 9,40,41& 11,60,61 \\ \hline Set_2 & 15,8,17 & 21,20,29 &27,36,45 &33,56,65 & 39,80,89 \\ \hline Set_3 & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 & 75,100,125 \\ \hline Set_{4} &63,16,65 &77,36,85 &91,60,109 &105,88,137 &119,120,169 \\ \hline Set_{5} &99,20,101 &117,44,125 &135,72,153 &153,104,185 &171,140,221 \\ \hline Set_{6} &43,24,145 &165,52,173 &187,84,205 &209,120,241 &231,160,281 \\ \hline \end{array}
- $\text{If }\space(2n-1)=1\space $ or $\space k=1,\space $ triples are primitive: $\quad C-B=1\space \lor\space C-A=2.$
- $\text{If }\space(2n-1)\space$ is prime, the following formula will generate only primitives. It repeatedly generates $\quad\big((2n-1)-1\big)\quad $ primitives and then skips a predicted non-primitive.
\begin{align*} &A=(2n-1)^2+&2(2n-1)\bigg(k+\bigg\lfloor\frac{(k-1)}{(2n-2)}\bigg\rfloor\bigg)&\qquad\\ &B=&2(2n-1)\bigg(k+\bigg\lfloor\frac{(k-1)}{(2n-2)}\bigg\rfloor\bigg)&\qquad+2\bigg(k+\bigg\lfloor\frac{(k-1)}{(2n-2)}\bigg\rfloor\bigg)^2\\ &C=(2n-1)^2+&2(2n-1)\bigg(k+\bigg\lfloor\frac{(k-1)}{(2n-2)}\bigg\rfloor\bigg)&\qquad+2\bigg(k+\bigg\lfloor\frac{(k-1)}{(2n-2)}\bigg\rfloor\bigg)^2 \end{align*} 3) Else, there is a non-primitive whenever $\space k\space$ is a multiple of any factor of $\space(2n-1).$
I have not been able to find reference anything like this formula or the sets it generates in the many books I've bought on the subject or on web sites or in forums like this.
Is this formula original with me or is there someone, somewhere or something I should cite in my references?