# Primitive Pythagorean Triples odd number pattern

I'm reading "Friendly Introduction to Number Theory". Now I'm working on Primitive Pythagorean Triples Exercises 2.3 (a) on P19.

2.3. For each of the following questions, begin by compiling some data; next examine the
data and formulate a conjecture; and finally try to prove that your conjecture is correct. (But
don’t worry if you can’t solve every part of this problem; some parts are quite difficult.)
(a) Which odd numbers a can appear in a primitive Pythagorean triple (a, b, c)?


https://www.math.brown.edu/~jhs/frintch1ch6.pdf

(1) $$a^2 + b^2 = c^2$$ with a odd, b even, a,b,c having no common factors

(2) $$a^2 = c^2 - b^2 = (c-b)(c+b)$$

(3) $$c + b = s^2$$ and $$c - b = t^2$$

(4) $$c = \frac{(s^2 + t^2)}{2}$$ and $$b = \frac{(s^2 - t^2)}{2}$$

(5) $$a = \sqrt{(c-b)(c+b)} = st$$

(6) $$a = st$$, $$b = \frac{(s^2 - t^2)}{2}$$, $$c = \frac{(s^2 + t^2)}{2}$$

I compiled some data and examining it but I can't find the pattern. Can you see any patterns? I need a hint.

https://github.com/y-zono/friendly-introduction-number-theory/blob/master/02/2-3/main.go

{a   b  c   s  t}
--------------
{3   4  5   3  1}
{5  12  13  5  1}
{7  24  25  7  1}
{9  40  41  9  1}
{11 60  61  11 1}
{13 84  85  13 1}
{15 8   17  5  3}
{15 112 113 15 1}
{17 144 145 17 1}
{19 180 181 19 1}
{21 20  29  7  3}
{33 56  65  11 3}
{35 12  37  7  5}
{39 80  89  13 3}
{45 28  53  9  5}
{51 140 149 17 3}
{55 48  73  11 5}
{57 176 185 19 3}
{63 16  65  9  7}
{65 72  97  13 5}
{77 36  85  11 7}
{85 132 157 17 5}
{91 60  109 13 7}
{95 168 193 19 5}
{99 20  101 11 9}

a:   3 5 7 9 11 13 15 15 17 19 21                33 35    39       45       51    55 57       63 65                77          85       91    95    99
odd: 3 5 7 9 11 13 15    17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99


Update 1

According davidlowryduda's advice, I compiled some more data. Then I found 23 was appeared.

// max of s = 20
a:   3 5 7 9 11 13 15 15 17 19 21                33 35    39       45       51    55 57       63 65                77          85       91    95    99
odd: 3 5 7 9 11 13 15    17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99

// max of s = 30
a:   3 5 7 9 11 13 15 15 17 19 21 21 23 25 27 29    33 35    39       45       51    55 57       63 65    69       75 77          85 87    91    95    99
odd: 3 5 7 9 11 13 15    17 19 21    23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99


And now 31 is not appeared but I can assume that the number exist when I compile some data more.

$$s=31 and t=1$$ or $$s=1 and t=31$$

$$s=31 ,t=1$$ Then $$(s^2−t^2)/2=(961−1)/2=480$$ and $$(s^2+t^2)/2=(961+1)/2=481$$

$$31^2+480^2=481^2$$

So it turns out that 31 appears.

// max of s = 40
3 5 7 9 11 13 15 15 17 19 21 21 23 25 27 29 31 33 33 35 35 37 39 39       45       51    55 57       63 65    69       75 77          85 87    91 93 95    99
3 5 7 9 11 13 15    17 19 21    23 25 27 29 31 33    35    37 39    41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99


I confirmed that 31 appeared when I showed the data more. And the 41 is not showed this time..

So I can assume that all odds numbers appear and I think I can find something the pattern.

Great question!

Looking at your data, it seems that you think that not every odd number appears in a primitive Pythagorean triangle. Is that right? And the first number you haven't found is $$23$$.

It may be a good idea to see if you can specifically find a triangle containing $$23$$. One thought may be to look at $$(a, b, c) = (st, (s^2 - t^2)/2, (s^2 + s^2)/2)$$, so try to write $$a = st$$.

For you, that means $$23 = st$$. This is a great example to try, since there are only two possible factorizations as $$23$$ is prime! Either $$s = 23$$ and $$t = 1$$, or $$s = 1$$ and $$t = 23$$.

Suppose we take $$s = 23, t = 1$$. Then $$(s^2 - t^2)/2 = (529-1)/2 = 264$$ and $$(s^2 + t^2)/2 = 265$$. Checking, we verify that $$23^2 + 264^2 = 265^2$$, and this is a primitive triple.

So it turns out that $$23$$ appears after all!

If you carry on with this sort of thinking, you should find that you can describe all odd $$a$$ appearing in a primitive Pythagorean triangle.

Let's turn this hint into a strategy. You collected data (very good!), formatted it for detecting patterns, and started to identify a pattern.

It can be very hard to identify patterns with incomplete data, so it's a good idea to try to push and prod at your data a little bit. Hopefully you'll find that it's full enough for the pattern to be there.

One particularly good way is to consider explicitly some of the edge cases in your data. In this case, I looked at the smallest odd number that doesn't appear in the data --- only to find that it actually was there. But maybe the next smallest odd number is interesting? Or maybe not!

Good luck!

• Thank you! Can you give me for a while to think about your answer. – zono Oct 22 '18 at 13:37