Tuesday, January 10, 2012

a2 + b2 = c2

I was going through the problems posted in Project Euler and was suddenly struck with this problem Pythagorean TripletFind the only Pythagorean triplet, {a, b, c}, for which a + b + c = 1000

I immediately Googled on how to find Pythagorean triplet and here it goesGiven any two arbitrary numbers ‘m’ and ‘n’Take a = m2 - n2b = 2mnc = m2 +n2Hence a2+b2 = c2 and we get a triplet well this method gives an idea how to form new triplets but not tofind a triplet containing a given number

I was really interested in this now consider the expansion (x + a)2 = x2+ a2 +2axif a2 + 2ax = some square number .say y2 then we get a triplet ( x, y, x+a )so for a given 'y' we have to find 'x' and 'a' to get the triplet ( x, y, x+a )y2 = a2 + 2ax = a ( a + 2x )a2 = y2 – 2axClearly ‘a’ should be lesser than square root of ‘y’

substituting a = 1 or 3 or 4 we get fractional values of ‘x’ hence we omit them

hence taking a=2 we get x=8hence the triplet is (8, 6, 8+2) i.e.( 8, 6, 10) hence we can generate any triplet for a given number by choosing proper value for 'a'

Furthur observations :

1) 'a' is odd for a given odd square number and vice versa2) Special case : consider y2= 4 or 1 . there are no values for 'a' in this case as square root are 2 and 1. Hence we cannot have a triplet containing 1 or 2

3) The above statement also proves that "There cannot be a right angled triangle with integer sides and any one of sides equal to 1 or 2"

I Googled on this topic and found nothing regarding this to be continued