Browse Groups

• ## Correction to previous post on Pythagorean triples

(1)
• NextPrevious
• ... Hello Jayanta. I am surprised to read you say computing time for finding the distinct primitive Pythagorean triplets becomes large for large numbers. The
Message 1 of 1 , Sep 22, 2009
View Source
> ________________________________________________________________________
> 1. Primitive Pythagorean Triples
> Posted by: "Jayanta Das" jkdnni@... jdas1955
> Date: Mon Sep 21, 2009 6:27 am ((PDT))
>
>
>
> As
> we know, given any odd integer that is the product of k odd integers, all
> distinct then we will get 2^k number of primitive Pythagorean
> triplets. But in
> most cases, the actual triplet members can be found only on a computer
> and that
> too for large numbers computing time becomes extremely large. Here, I
> have
> tried to present a general result that helps in fast and easy
> computation of
> the triplets.
>
>

Hello Jayanta.

I am surprised to read you say computing time for finding the distinct

primitive Pythagorean triplets

becomes large for large numbers.

The computing time depends mostly on the number of distinct factors.

Suppose p = p1 * p2 * p3 * p4 * . . . * p_k.

where p1, p2, p3, p4,.... p_k are all distinct.prime positive integers
equal to 1 mod 4.

Each p1, p2, p3,p4, .... p_k is the sum of two squares.

p1 = a1**2 + b1**2
p2 = a2**2 + b2**2
p3 = a3**2 + b3**2
p4 = a4**2 + b4**2
...
...
...
p_k = a_k**2 + b_k**2

Let s1, s2, s3, s4,...s_k be binary variables, drawn from {-1,+1}.

That is,

s1 is either -1 or +1
s2 is either -1 or + 1
s3 is either -1 or +1
s4 is either -1 or +1
...
...
...
s_k is either -1 or +1

Calculate all the complex number products

(A + B i) = (a1 + s1 b1 i)*(a2 + s2 b2 i)*(a3 + s3 b3 i) * (a4 + s4 b4
i) * ... * (a_k + s_k b_k i)

where i = square root of minus one.

There are 2**k such products.

For each of these 2**k products,

A**2 + B**2 = p1 * p2 * p3 * p4 * ... * p_k = p

From here we find our Pythagorean triple to be

(A**2 - B**2)**2 + (2*A*B)**2 = (A**2 + B**2)**2

However these 2**k complex products can be paired by conjugates.
That is, half of these 2**k products have B positive, and half have B
negative.

There are not 2**k distinct Pythagorean triples, but half that number,
2**(k-1).

This is as expected since if p = p1 is a prime,
we expect not 2**1 = 2 distinct Pythagorean triples,
but 2**(1-1) = 2**0 = 1 distinct Pythagorean triple.

It requires only (2**k) * (k-1) complex number multiplications to calculate
all the 2**k Pythagorean triples.

Numerical example.

65 = 5 * 13

5 = 2**2 + 1**2
13 = 3**2 + 2**2

(2 + i)*(3 - 2 i)
= (2 * 3 + 2 * 2) + (1*3 - 2 * 2) i
= 8 - i

65 = 8**2 + 1**2

(2 + i) * (3 + 2 i)
= (2 * 3 - 2 * 1) + (2 * 2 + 3 * 1)
= 4 + 7 i

65 = 4**2 + 7**2

From 65 = 8**2 + 1**2

we obtain

(8 + i)*(8+i) = (64 - 1) + (2 * 8) I = 63 + 16 i

which yields the Pythagorean triple,

63**2 + 16**2 = 65**2

From 65 = 4**2 + 7**2

we obtain

(4 + 7 i) * (4 + 7 i) = (4 * 4 - 7 * 7) + (2 * 4 * 7) i
= -33 + 56 i

which yields the Pythagorean triple,

33**2 + 56**2 = 65**2

Kermit
Your message has been successfully submitted and would be delivered to recipients shortly.
• Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
• Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer. We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.