How would you proof a new set of equations for generating pythagorean triples?

73 Views Asked by At

I was studying Pythagorean triples for the GRE and I noticed a simple arithmetic pattern for the a terms. This led me to look for patterns for the b and c terms. I found that evens and odds follow different patterns, but it seems like all odds follow one set of patterns, and all evens another.

Using these patterns, I found a method for generating two unknown terms from a single known term. This is something I haven't seen before, so I want to check if my algorithms are always right, and I also want to check to make sure they don't skip over or miss any triples. (i.e. check for false positives and false negatives)

To do so, I built a simple table in Excel using calculated columns and generated the first 100 sets of a, b, c for both series (evens and odds). Now, things seem to check out when I spot-check my outputs against lists of P.Triples I've found online, but I don't have time to sit here and check every term--I need to study!! (test tomorrow)

So, how could I quickly and rigorously "proof" this theory??

Here are my algorithms:
For ODDS:
$$a_n=1+2n$$ $$b_n=(a_n-1)(n+1)$$ $$c_n=b_n+1$$


For EVENS:
$$a_n=4+2n$$ $$b_n=(a_n/2+1)(n+1)$$ $$c_n=b_n+2$$

2

There are 2 best solutions below

0
On BEST ANSWER

Your algorithm does not generate all primitive Pythagorean triples. The table below is a sample of the subset of triples where $GCD(A,B,C)=(2x-1)^2,x\in\mathbb{N}$. In the table, you can see that your first algorithm generates only $Set_1$ and your second algorithm generates only the first column of triples with $A,B$ reversed.

\begin{array}{c|c|c|c|c|c|c|} n & k=1 & k=2 & k=3 & k=4 & k=5 & k=6 \\ \hline Set_1 & 3,4,5 & 5,12,13& 7,24,25& 9,40,41& 11,60,61 & 13,84,85 \\ \hline Set_2 & 15,8,17 & 21,20,29 &27,36,45 &33,56,65 & 39,80,89 & 45,108,117 \\ \hline Set_3 & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 & 75,100,125 & 85,132,157 \\ \hline Set_{4} &63,16,65 &77,36,85 &91,60,109 &105,88,137 &119,120,169 & 133,156,205 \\ \hline Set_{5} &99,20,101 &117,44,125 &135,72,153 &153,104,185 &171,140,221 & 189,180,261 \\ \hline \end{array} You will note that $A$ can be any odd number greater than one, that $B$ can be any multiple of four, and that $C$ always takes the form of $4x+1$. The formula that generates these table "elements" is. \begin{equation} A=(2n-1)^2+2(2n-1)k\\ B=2(2n-1)k+2k^2\\ C=(2n-1)^2+2(2n-1)k+2k^2 \end{equation} If we set $n=1$ for $Set_1$, we get

\begin{equation} A=2k+1\qquad B=2k^2+2k\qquad C=2 k^2 + 2 k + 1 \end{equation} If we let $k=1$ for $Column_1$, we get $$A=4n^2-1\qquad B=4n\qquad C=4n^2+1$$

I believe these simplified formulas generate the same triples as your formulas.

It is a simple exercise from here to prove $A^2+B^2=C^2$, that $GCD(A,B,C)=(2x-1)^2$, and that, if the interval between values of $A$ is other than $(2n-1)k$, that the functions for $B$ and $C$ derived from the Pythagorean theorem will produce non-integers for most combinations of $(n,k)\cdots$ meaning that the formula as presented it missing no primitive triples.

3
On

So, thanks to Lulu's comment, I think this is how you would prove this.

Here's the proof for the odds: $$a_n^2=(2n+1)(2n+1)=4n^2+4n+1$$ $$b_n=(1+2n-1)(n+1)=2n(n+1)=2(n^2+n)$$ $$b_n^2=(2(n^2+n))^2=4(n^2+n)(n^2+n)=4n^4+8n^3+4n^2$$ $$a_n^2+b_n^2=4n^4+8n^3+8n^2+4n+1$$ $$c_n=2(n^2+n)+1=2(n^2+n+1/2)$$ $$c_n^2=4(n^2+n+1/2)(n^2+n+1/2)=4n^4+8n^3+8n^2+4n+1$$

So, $a_n^2+b_n^2=c_n^2$, which I think proves it's correct.

And here's the proof for the evens: $$a_n^2=(2n+4)(2n+4)=4n^2+16n+16$$ $$b_n=((2n+4)/2+1)(n+1)=(n+3)(n+1)=n^2+4n+3$$ $$b_n^2=(n^2+4n+3)^2=4(n^2+4n+3)(n^2+4n+3)=n^4+8n^3+22n^2+24n+9$$ $$a_n^2+b_n^2=n^4+8n^3+26n^2+40n+25$$ $$c_n=n^2+4n+5$$ $$c_n^2=(n^2+4n+5)(n^2+4n+5)=n^4+8n^3+26n^2+40n+25$$

Again, $a_n^2+b_n^2=c_n^2$, which I think proves both sets of equations will always give a Pythagorean triple.