• Welcome to Valhalla Legends Archive.
 

Pyth. Triples Formula

Started by CrAzY, August 06, 2004, 10:13 PM

Previous topic - Next topic

CrAzY

I believe I've found an undiscovered formula to generate pythagorean triples.  Or should I say, 2...

Given Int(A)

If A is Odd, Then B = (A^2-1)/2; C = B + 1
If A is Even, Then B = ((A^2)/2)-1; C = B + 2

Made a program for it too,
http://addpower.org/TrippleCalculator.exe

Yawn... This is what happens when you get bored while taking Geometry 6 1/2 hours a day durring the summer. :(  Guess good things come out of it too?
CrAzY

dxoigmn

Doesn't look complete.  Can you generate: A = 15, B = 8, C = 17.  Your formula assumes C = B + 1 OR C = B + 2 depending on A, which isn't necessarily true.

Yoni

#2
Very nice!

For any odd integer A, let B = (A^2 - 1) / 2, then:
A^2 + B^2 = A^2 + (A^4 - 2A^2 + 1) / 4 = (A^4 + 2A^2 + 1) / 4 = ((A^2 + 1) / 2) = (B + 1)^2
Hence A,B,B+1 is a pythagorean triple.

For an even integer, your formula is not correct, but you used a correct one in your sample program. It is:
B = (A / 2)^2 - 1

For any even integer A, let B = (A / 2)^2 - 1, then:
A^2 + B^2 = A^2 + A^4 / 16 - A^2 / 2 + 1 = A^4 / 16 + A^2 / 2 + 1 = ((A^2 / 2)^2 + 1)^2 = (B + 2)^2
Hence A,B,B+2 is a pythagorean triple.

In addition to that, for any such A, the integers B and B+2 are coprimes, giving for every integer n, a unique pythagorean triple with n the least element. (*)

Great work! Keep it up. :)

Edit:
A correction. (*) is only true when A != 2 (mod 4).

Maddox

This is not an unknown formula.
asdf.

K

Quote from: Maddox on August 24, 2004, 05:14 AM
This is not an unknown formula.

The idea behind the encouragement is not that it's an unknown formula, but rather that he came up with it independently.

CrAzY

Thanks... I'll name it the Yoni Forumlas because Yoni is nice... You figure one out by your self maddox  >:(
CrAzY