If you've had high school geometry, you know about the Pythagorean Theorem. It states that the sum of the squares of the sides adjacent to the right angle in a right triangle is equal to the square of the side opposite the right angle, often written as a2 + b2 = c2. Pythagorean triples are solutions to this equation where a, b, and c are all positive integers. We explicitly exclude solutions where a or b is zero. (For example, if a = 0, then b = c, and any positive integer will work for b. Not very interesting.) Suppose we want to find a method for determining all the solutions for a given a. So, for example, if a = 27, are there any solutions where b and c are positive integers. If so, what are they? And can we be sure we've found all of them?

Let's begin by recasting the problem like this:

Clearly m must be a factor of a2. One approach to solving the problem, therefore, would be to find all the factors of a2 and see which (if any) lead to a solution. In our example, 272 = 729 has factors 1, 3, 9, 27, 81, 243, and 729. This leads to the following family of potential solutions:

Some of the potential solutions do not yield positive integers for b. In fact only the first three do. It looks as if we can ignore factors where m a . Let's see if we can formalize this intuition.

First, if m = a , then clearly b = 0, so we can ignore factors where m = a. Second, if m > a , then 2 b + m < a , or 2 b < a m . However, since m > a , a m < 0. Therefore, 2 b < 0, which can only be true if b < 0. So if m > a , then b < 0. Since we are only interested in positive integer solutions, we can ignore factors m of a 2 where m a .

Let's try another example. Let's let a = 105. Then a 2 = 11025, which has 27 factors of which there are 13 less than 105: 1, 3, 5, 7, 9, 15, 21, 25, 35, 45, 49, 63, 75. This leads to 13 solutions:

That seemed to go pretty well. Let's make another trial. Lets choose a = 10, a 2 = 100. There are 9 factors of which 4 are less than 10: 1, 2, 4, 5. Let's see what happens if we try them.

Only one of these solutions satisfies the requirement that all the numbers be positive integers. To see why, let's consider what happens if a is even.

If a is even, then m (2 b + m ) must also be even. However, whenever m is odd, the expression m (2 b + m ) must also be odd. Therefore m odd can never lead to a solution for a even. What about the case above where m = 4? Let's consider the case where a = 2 n p where p is odd. Then 2 2 n p 2 = m (2 b + m ). Clearly, if m = 2 2 n , then p 2 = 2 b + 2 2 n . However, this contradicts the stipulation that p must be odd. Therefore, m = 2 2 n cannot lead to a solution. In summary, for a even, there are no integer solutions when m is odd or when m contains all the 2s in a 2 .

Let's take a look at one more example. Suppose a = 360, a 2 = 129600. There are 105 factors of 129600 of which 52 are less than 360. We can count the factors by looking at the prime factorization of 129600. Let's start with the prime factorization of 360.

Squaring it gives a prime factorization for 129600 of:

Counting 0 as an exponent, we get 7 5 3 = 105 total factors of 129600. Of those 5 3 = 15 are odd. Another 15 contain the maximum power of 2. Also just less than half, 52, are less than 360. Here is a table that shows which factors lead to solutions. All in all, there are 37 values for m that lead to a solution.


20

21

22

23

24

25

26

30 ∙ 5 0

1

2

4

8

16

32

64

31 ∙ 5 0

3

6

12

24

48

96

192

32 ∙ 5 0

9

18

36

72

144

288

≥ 360

33 ∙ 5 0

27

54

108

216

≥ 360

≥ 360

≥ 360

34 ∙ 5 0

81

162

324

≥ 360

≥ 360

≥ 360

≥ 360

30 ∙ 5 1

5

10

20

40

80

160

320

31 ∙ 5 1

15

30

60

120

240

≥ 360

≥ 360

32 ∙ 5 1

45

90

180

≥ 360

≥ 360

≥ 360

≥ 360

33 ∙ 5 1

135

270

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

34 ∙ 5 1

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

30 ∙ 5 2

25

50

100

200

≥ 360

≥ 360

≥ 360

31 ∙ 5 2

75

150

300

≥ 360

≥ 360

≥ 360

≥ 360

32 ∙ 5 2

225

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

33 ∙ 5 2

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

34 ∙ 5 2

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

≥ 360

I leave it to the reader to find the solutions.