Talk:Pythagorean triple/Comments

From Wikipedia, the free encyclopedia

Please find below a copy of an e-mail that I sent to Dr. Ross from www.friesian.com/pythag.htm about a simple and exhaustive method for generating triplets that is not listed in his article and also not in http: /en.wikipedia.org/wiki/Pythagorean_triple. You can use it as you see fit.

copy of e-mail:

Dear Dr Ross,

I read your article on pythagorean triplets in www.friesian.com/pythag.htm and I also read the wikipedia piece http: /en.wikipedia.org/wiki/Pythagorean_triple . I am not a mathematician, but a retired engineer, and was more or less getting into this pythagorean triplets by accident, as a friend wrote me about this and how to generate the triplets. I have come up with a way of generation that is not covered in both references above. If you have the time and deem the idea interesting, would you please comment on it. I also peruse the article with matrices in mathworld.wolfram.com, but I found it too complex for a non-mathematician.

Simple generation of Pythagorean Triplets.

If we start with the problem as in plane geometry first and start analyzing it from the start, then an exhaustive algorithm automatically emerge.

Consider the triangle ABC with sides: a opposite angle A

                                        b opposite angle B
                                        c opposite angle C, angle C being the 90 degree angle.

1. Then side c being the hypotenuse, the sides a and b will both be smaller than side c. 2. We also only need to look at the case (side a) < (side b). Should it happen that (side a) > (side b), then we flip the rectangle along the axis formed by (side a), and then let it lie on (side a) - hence making (side a) horizontal. Whence we get the case [b < a < c]

Wherefore, if a**2 + b**2 = c**2, then a**2 = c**2 - b**2 = (c+b)(c-b). We can also factor a**2, say a**2= x*y and without losing generality assume x < y. This tells us to first square a, and then to factor it in two parts x and y. This is always possible, as we can always factor a**2 = (a**2)*1. Hence we can equate:

       c+b =  y
       c-b =  x

such that the sum (x+y) = 2c =even number, and the same is true for (y-x)=2b, it also has to be even. Hence factorization where the factors are not even can be put aside. 3. The case b=0 we can forget.

Using this algorithm we can start:

   a        = 1    no solution
   a        =2    factors:     1, 4    NO solution, since sum is odd.

   a        =3    factors:    (1, 9) and (3,3). this later is trivial meaning b=0, hence no triangle.
                                   factors (1, 9) yields b=4 and c=5 or triplet [3, 4, 5]

   a        =4    factors:    (1,16), (2, 8) yielding nothing for the first one (odd sum) and [4,3, 5] the same as in a = 3

   a        =5    factors:    (1,25), (5, 5). Only for the first [5,12, 13]

   a        =6    factors:    (1,36), (2,18), (3,12), (4,9)
                       only (2,18) is of interest, yielding [6, 8, 10]

   a        =7    factors:    (1,49) yielding [7, 24, 25]
   
   a        =8    factors:    (1,64), (2,32), (4,16) with triplets [8, 63, 65], [8, 15, 17], [8, 6, 10]. Per assumption 2, we can forget this last one, as it must have been covered earlier - see case a=6
   
   a        =9        factors:    (1,81), (3,27) yielding triplets [9, 80, 82] and [9, 12, 15]

   a        =10        factors:    (1,100), (2, 50), (4, 25), (5,20)
   Only the first two yields triplets [10,99, 101] and [10, 48, 52]


and you can go on and on with integer a exhausting the set/space of all integers.

Notice that you can always factor a**2 into (1, a**2), so that you will always have a triplet [a, (a**2 - 1), (a**2+1)]. Also when a is even = 2e, then you also have a triplet [2e, 2**2{(e**2-1), (e**2+1)}] as per formula: (pa)**2 + (pb)**2 = (pc)**2

As with increasing numbers you will have many more factorization possiblities, hence more insights can be derived by looking into the factorization possibilities and its characteristics of the integers N. This should have been covered extensively in number theory (that I have not yet studied). Q.E.D.

Based on the factorization above we can easily verify the methods as given in the two references cited above.

As an example I have extended the case for a = p*q

Hence a**2 = (p*q)**2 can be factored into:

i.1 a**2 = p*(pq**2) ----> c - b = p

                               c + b = p*q**2

giving: b= [(p*q**2) - p]/2

           c = [(p*q**2) + p]/2

i.2 a**2 = (p**2)(q**2) ----> c - b = p**2

                                   c + b = q**2

giving b = [p**2 - q**2]/2

           c = [p**2 +  q**2]/2

This the solution you presented as provided by Juan Tolosa.

i.3 a**2 = (p**2.q)(q) ----> c + b = p**2.q

                                               c - b = q

giving b = [p**2.q - q]/2

           c = [p**2.q + q]/2

i.4 a**2 = (p**2 q**2) * 1 ----> c + b = p**2 q**2

                                                       c - b = 1

giving b = [p**2 q**2 -1]/2

           c = [p**2 q**2 +1]/2


Regards,

Swan-Bing HAN

bk888han@sympatico.ca, 18 Bradley Farm Court, Ottawa, Ontario, Canada K2L 4B5