# Few and far between?

This open investigation follows on from the problem Generating Triples. *It can be taken to many levels of complexity*.

The well-known Pythagorean Triple ${3,4,5}$ has the property that the two smaller numbers differ by 1.

Can you find any more Pythagorean Triples where the two smaller numbers differ by 1? Investigate your findings.

For more investigations see our Stage 5 pages.

This problem might be a good one to explore with some computer programming.

We had some good international thinking on this stimulating investigation from a wide range of ages, with some experimental computation and analytical reasoning. I was delighted by the levels of creativity displayed. There are clearly some great mathematicians in the making!

Gilbert, Mookie and Kyle from Li Po Chun United World College of Hong Kong said:

Freddie from Kingston Grammar School

Using Excel, I have found that there are six such triples with the smallest number below 100,000. I did this by calculating $\sqrt{n^2 + (n+1)^2}$ and looking for integers (using integer n's).

The triples are:

3,4,5;

20,21,29;

119,120,169;

696,697,985;

4059,4060,5741;

23660,23661,33461

Mahdokht from Farzanegan of Kermanshah used the formula which generates all Pythagorean triples which don't share a common factor: If $a^2+b^2=c^2$ then there are natural numbers $m> n\geq 1$ for which $$a=mn, b=\frac{m^2-n^2}{2}, c=\frac{m^2+n^2}{2}$$ Mahdokht then investigated solving $b=a+1$ and found the equation

$$m^2-2mn -n^2-2=0$$ The solution is $$m = n \pm \sqrt{2n^2+2}$$ and, as Mahdokht points out, this mean that $2n^2+2$ must be a square number. Using this as a guide, Mahdokht found the triples 20, 21, 29 and 119, 120, 169.

Eleanor from Dr. Challoner's High School made a wonderful observation in her solution:

I feel, if my fomula is correct, which is has been for a far a I have tested it which is up to about n=100 but after that the values are too large for the computer to hand. To work out each triplet just put a value n into the fomula that is 2 or bigger and an integer and it will give the 2nd longest side. Here are my first few examples:

3 4 5

20 21 29

119 120 169

696, 697 985

4059 4060 5741 ,

23660 23661 33461

137903 137904 195025

803760 803761 1136689

4684659 4684660 6625109

27304196 27304197 38613965

159140519 159140520 225058681

927538920 927538921 1311738121

5406093003 5406093004 7645370045

31509019100 31509019101 44560482149

William from Barnton Community Primary School explored in a similar way, and said (in an exceptionally creative solution)

$$ \begin{matrix} 0^2 + 1^2 &=& 1^2\\ 3^2 + 4^2 &=& 5^2\\ 20^2 + 21^2 &=& 29^2\\ 119^2 + 120^2 &=& 169^2\\ 696^2 + 697^2 &=& 985^2\\ 4,059^2 + 4,060^2 &=& 5,741^2\\ 23,660^2 + 23,661^2 &=& 33,461^2\\ \end{matrix} $$I used Excel to scan through all of the square numbers up to $h^2+(h+1)^2=60000$. I then found the ratio between each finding. It tended towards $3+2\sqrt{2}$. From there I found how to get from one number to the next.

If $a_n^2 + (a_n+1)^2 = b_n^2$ and $a_1 = 0$ and $b_1 = 1$ then:

$R=3+2\sqrt{2}$

$a_n=\mbox{int}(a_{n-1}R)+3\quad \mbox{int}(b_{n-1}R)$

That gives me: $$ \begin{matrix} 23,660^2 + 23,661^2 = 33,461^2\\ 137,903^2 + 137,904^2 = 195,025^2\\ 803,760^2 + 803,761^2 = 1,136,689^2\\ 4,684,659^2 + 4,684,660^2 = 6,625,109^2\\ 27,304,196^2 + 27,304,197^2 = 38,613,965^2\\ 159,140,519^2 + 159,140,520^2 = 225,058,681^2\\ 927,538,920^2 + 927,538,921^2 = 1,311,738,121^2\\ 5,406,093,003^2 + 5,406,093,004^2 = 7,645,370,045^2\dots \end{matrix} $$

We invite you to consider if this method will always work and to consider why it works.

Matthew from QE Boys school presented us with a marvellous solution. I was so pleased to see such levels of mathematical creativity and this is well worth trying to understand. Well done to you Matthew!

I ran this on a spreadsheet to check and this does indeed generate the required sides - you might like to explore this idea further