# Why there are exactly 100 distinct (not necessarily primitive) Pythagorean triples $(a,b,c)$ with $c<100$?

Why there are exactly 100 distinct (not necessarily primitive) Pythagorean triples $(a,b,c)$ with $c<100$?

Using the fact that all primitive Pythagorean triples can be generated by the following:

$a=2uv, b=u^2-v^2, c=u^2+v^2,$

where $u>v, u$ and $v$ are of different parity (i.e., one is even and the other odd), and $u$ and $v$ are relatively prime (i.e., their greatest common divisor is 1), then

let $a^2+b^2=c^2$ and suppose $a,b$ to both be odd. Then $a^2+b^2=1+1=2,$ and 2 is not a square root in mod 4, thus one, either $a$ or $b$ must be even. Since $gcd(a,b)=1$ then if, say $a$ is even then $b$ must be odd, meaning $c$ is also odd.

So I have solved for the $2uv$ portion but do not know how to get to the $u^2-v^2$ or $u^2+v^2$?

• Maybe this help, the number of solutions of $x^2+y^2=p$ is 0, 1 or 2, if $p\equiv 3 \pmod{4}$, $p=2$ or $p\equiv 1\pmod{4}$. From here I use the relation $(m^2+n^2)(p^2+q^2)=(mp+nq)^2+(mq-np)^2$ to construct the pythagorean triples. – Ricardo Largaespada Sep 18 '18 at 15:23
• I apologize, I'm not sure I follow. – K Math Sep 18 '18 at 17:43
• @RicardoLargaespada please refer to my edits. Thank you. – K Math Sep 18 '18 at 21:26

An interesting coincidence. OEIS sequence A063468 $\,a(n)\,$ is the number of Pythagorean triples with $\,0<c\le n.\,$ $a(96) \!=\! 98,\, a(97) \!=\! a(98) \!=\!a(99) \!=\! 100,\, a(100) \!=\! 104.$ Thus $\,a(99)\!=\!100\,$ is the number of Pythagorean triples with $\,c\!<\!100.\,$

You don't need to use equations. Just count the number of triples that satisfy the conditions using a simple computer program with for loops. For some example programs read the the OEIS entry. Also OEIS sequence A224921 for a closely related sequence where $\,a<b\,$ which leads to half the number of triples since $\sqrt{2}$ is irrational.

Wy are there exactly $100$? There is no particular reason except that it is the number of triples that satisfy the conditions. One can ask the same question about any other value of $n$. No real difference in the reason. It is what it is.

Let us find all these c<100. The following formula give all Pythagorean triples:

3) $a=m^2-n^2, b=2mn, c=m^2+n^2$

$c=m^2+n^2<100$ ⇒ $m<10, n<10$ ⇒ $(m,n)= (9,2), (9, 4),(8,1), (8,3),(8,5),(7,2),(7,4),(7,6),(6,1),(6,5),(5,2),(5,4),(4,1),(4,3),(3,2),(2,1)$

That is there is 16 primitive triples.The primitives less than 50 are:

• $5$ which gives 18 other triples less than 100.

• $13$ which gives 6 other triples less than 100.

• $17$ which gives 4 other triples less than 100.

• $25$ which gives 2 other triples less than 100.

• $29$ which gives 2 other triples less than 100.

• $37$ which gives 1 other triple less than 100.

• $41$ which gives 1 other triple less than 100.

That is we have 34 triples other than primitives, so number on triples less than 100 is:

$$2\times(34+16)=100$$

• What about $(9,1),(7,1),(7,3),(5,1),(5,3),(3,1),(1,1)$? Also the pair $(6,3)$ is not primitive. – Ricardo Largaespada Sep 19 '18 at 23:58
• But c must be odd and the pairs you mentioned do not give primitives ,like (6,3). So there must be 52. – sirous Sep 20 '18 at 5:11
• Are you assuming that the triple (3,4,5) is different from the triple (4,3,5)? Because they are different. – Ricardo Largaespada Sep 20 '18 at 5:20
• Then there is 104 not 100! – sirous Sep 20 '18 at 5:25
• 5 which gives 18 other triples less than 100. 13 which gives 6 other triples less than 100. 17 which gives 4 other triples less than 100. 25 which gives 2 other triples less than 100. 29 which gives 2 other triples less than 100. 37 which gives 1 other triple less than 100. 41 which gives 1 other triple less than 100. That is we have 34 triples other than primitives, so number on triples less than 100 is: 34+16=50 – Ricardo Largaespada Sep 20 '18 at 5:28

There being exactly 100 triples (I haven't counted) where A and B and C are all less than 100 is, I believe, just a chance coincidence of our $$base_{10}$$ number system. In $$Base_8$$, there are exactly $$20_8$$ primitives less than $$100_10$$ but only $$9_{10}=11_8$$ primitives less then $$64_{10}=100_8$$. None of this means anything unless it can have predictive power beyond the statement of coincidence.

The primitives and others with GCD(A,B,C) equal to an odd square and where the difference between $$C$$ and $$B$$ is the $$n^{th}$$ odd square my be grouped into sets. For $$C<100$$

Those in $$Set_1$$ where $$C-B=1$$ are $$f(1,1)=(3,4,5)$$ $$f(1,2)=(5,12,13)$$ $$f(1,3)=(7,24,25)$$ $$f(1,4)=(9,40,41)$$ $$f(1,5)=(11,60,61)$$ $$f(1,6)=(13,84,85)$$ Those in $$Set_2$$ where $$C-B=9$$ are $$f(2,1)=(15,8,17)$$ $$f(2,2)=(21,20,29)$$ $$f(2,3)=(27,36,45), GCD(A,B,C)=9$$ $$f(2,4)=(33,56,65)$$ $$f(2,5)=(39,80,89)$$ Those is $$Set_3$$ where $$C-B=25$$ are $$f(3,1)=(35,12,37)$$ $$f(3,2)=(45,28,53)$$ $$f(3,3)=(55,48,73)$$ $$f(3,4)=(65,72,97)$$ Those in $$Set_4$$ where $$C-B=49$$ are $$f(4,1)=(63,16,65)$$ $$f(4,2)=(77,36,85)$$