11

Has it been shown whether there is a finite or infinite number of Pythagorean triples whose smallest two numbers differ by 1?

In either case I’d appreciate a link to the proof.

Edit: thank you all for your answers. Would it also be possible to determine for which triples the smallest number is prime?

7 Answers7

18

There is an infinite number of such pythagorean triples. Any primitive pythagorean triple $(a,b,c)$ with $a^2+b^2=c^2$ (are we are looking for primitive triples since we want $a$ and $b$ consecutive) is of the form: $$ a=p^2-q^2,\qquad b=2pq,\qquad c=p^2+q^2 $$ with $p$ and $q$ coprime and not both odd. So we are looking for integer solutions of: $$ p^2-2pq-q^2 =\pm 1,$$ or: $$ (p-q)^2 - 2q^2 = \pm 1.$$ However we know that the Pell equation $A^2-nB^2=1$ has an infinite number of integer solutions $(A,B)$ for every $n$ that is not a square, hence we can find "consecutive" pythagorean triples from the solutions of $$ A^2 - 2B^2 = 1,\tag{1}$$ for istance. $(A,B)=(3,2)$ is the minimal solution of $(1)$, giving $(p,q)=(5,2)$, hence the triple $(20,21,29)$. The next solution can be found by expanding: $$ (3+2\sqrt{2})^2 = 17+12\sqrt{12},$$ hence $(p,q)=(29,12)$ gives the triple $(696,697,985)$ and so on.

In general, we can see that all the solutions depends on the convergents of the continued fraction of $\sqrt{2}$, i.e. on the Pell sequence: $$ (p,q) = (P_n,P_{n+1}),$$ from which:

$$ (a_n,b_n) = (2P_nP_{n+1},P_{n+1}^2-P_{n}^2) = (2P_n P_{n+1},2P_nP_{n+1}+(-1)^n),$$

where:

$$P_n = \frac{1}{2\sqrt{2}}\left((1+\sqrt{2})^n-(1-\sqrt{2})^n\right).$$

Since neither $2P_n P_{n+1}$ or $P_{n+1}^2-P_{n}^2$ may be primes if $n> 1$, the only "consecutive" pythagorean triple with the smallest element being a prime is $(3,4,5)$.

Jack D'Aurizio
  • 361,689
  • 1
    Of course, $(3,4,5)$ with $(A,B)=(1,0), (p,q)=(2,1)$ is truly the "minimum" solution of $(1)$, unless $B$ must be among the positive integers... – abiessu Oct 09 '14 at 17:11
7

Let's suppose $(x,x+1,y)$ is a Pythagorean triple. Then:

$x^2+(x+1)^2 = y^2$

$2x^2+2x+1 = y^2$

$4x^2+4x+2 = 2y^2$

$(2x+1)^2 + 1 = 2y^2$

$(2x+1)^2 - 2y^2 = -1$

This is now a negative Pell's Equation for which there are infinitely many solutions. See this question for details.

JimmyK4542
  • 55,969
5

Cheap version: we get triples $(x,y,z)$ such that $y=x+1$ and $x^2 + y^2 = z^2,$ with $$ (3 ,4,5 ) $$ $$ (20 ,21,29 ) $$ $$ ( 119,120, 169 ) $$ $$ (696 ,697, 985 ) $$ $$ (4059 , 4060,5741 ) $$ $$ (23660 ,23661,33461 ) $$ $$ (137903 ,137904,195025 ) $$

That is, $(x_n, y_n,z_n)$ such that $$ x_{n+2} = 6 x_{n+1} - x_n +2, $$ but $$ y_{n+2} = 6 y_{n+1} - y_n -2, $$ and $$ z_{n+2} = 6 z_{n+1} - z_n . $$

If you put them the way I had them at first, odd first and even second, you get a $4 (-1)^n$ addend that I thought was a bit too much work.

Will Jagy
  • 146,052
2

Such a triple will be primitive. Thus there exist relatively prime integers $r$ and $s$, of opposite parity, such that the triple is given by $(r^2-s^2,2rs,r^2+s^2)$.

So we want $2rs-(r^2-s^2)=\pm 1$. This can be rewritten as $$(r+s)^2-2r^2=\pm 1.$$ Each of these Pell equations has infinitely many solutions.

Wikipedia has a reasonable discussion of Pell equations. One can give a recurrence that will generate all solutions. One can even give an explicit but not very useful "closed form" formula that will yield all solutions.

André Nicolas
  • 514,336
2

Pythagorean triplets are of the form:

$$c = k(m^2+n^2) \hspace{1cm} b = 2kmn \hspace{1cm} a = k(m^2-n^2)$$

Where $k,m,n \in \mathbb{Z}^+$ so that:

$$c^2 = a^2 + b^2$$

You want $|a-b| = 1$ or equivalently, that: $k·|m^2-n^2-2mn| = 1$. So $k=1$ and $(m-n)^2-2n^2 = \pm 1$

Let $x = (m-n)$ and $y = n$. Then you have the equation $x^2-2y^2 =\pm 1$.

This is an example of what is called Pell's Equation and it has infinitely many positive integer solutions, so yes. There are infinitely many pythagorean triplets the sides of wich differ by a unit.

Darth Geek
  • 12,543
  • You could trivially extend this to say that there are infinite number of triples that differ by $k$ units by simply multiplying each solution from this Pell's Equation by $k$, right? – corsiKa Aug 10 '14 at 19:44
1

DISCLAIMER: This answers the different question of having any two sides differ by $1$. This solution has the hypotenuse and one leg differing by $1$. It is nice in its own right, though.

There is a particularly simple family of solutions:

Choose any odd integer $a>1$. Then define $b=(a^2-1)/2$ and $c=(a^2+1)/2$. Then we have $$ \begin{align} a^2+b^2&=a^2+\frac{a^4-2a^2+1}{4}\\ &=\frac{a^4+2a^2+1}{4}\\ &=c^2 \end{align} $$ as desired. For instance this produces $a=5,b=12,c=13$ and so on.

String
  • 18,838
0

You can generate Pythagorean triples where $B-A=\pm1$ in sequence with a seed Triple: $T_0=(0,0,1)$ using the following formula: $$A_{n+1}=3A_n+2C_n+1\qquad B_{n+1}=3A_n+2C_n+2\qquad C_{n+1}=4A_n+3C_n+2$$

For example, it generates the following $$T_1=(3,4,5)\qquad T_2=(20,21,29)\qquad T_3=(119,120,169)\qquad T_4=(697,696,985)$$ Another way to generate them directly is using Pell numbers that will feed Euclid's formula

$$P_n=\frac{(1+\sqrt2)^n-(1-\sqrt2)^2}{2\sqrt2}$$

This [Pell] function generates the series $1, 2, 5, 12, 29, 70, 169 ...$ and is a shoe-in for the $(m,n)$ pairs that generate $T_1, T_2, T_3 ...$ shown above. You find them using $\quad m_x=P_{x+1}\quad n_x=P_x\quad $ to obtain the following pairs (excuse using the letter P to describe pairs instead of individual Pell numbers):

$$P_1=(2,1)\quad P_2=(5,2)\quad P_3=(12,5)\quad P_4=(29,12)\quad P_5=(70,29)\quad P_6=(169,70)\quad ...$$

Once you have these, you plug them into Euclid's formula:

$$A=m^2-n^2\qquad B=2mn\qquad C=m^2+n^2$$

The first $19$, generated in a spreadsheet with a $15$-digit limit are:

$$f(2,1)=(3,4,5)$$ $$f(5,2)=(21,20,29)$$ $$f(12,5)=(119,120,169)$$ $$f(29,12)=(697,696,985)$$ $$f(70,29)=(4059,4060,5741)$$ $$f(169,70)=(23661,23660,33461)$$ $$f(408,169)=(137903,137904,195025)$$ $$f(985,408)=(803761,803760,1136689)$$ $$f(2378,985)=(4684659,4684660,6625109)$$ $$f(5741,2378)=(27304197,27304196,38613965)$$ $$f(13860,5741)=(159140519,159140520,225058681)$$ $$f(33461,13860)=(927538921,927538920,1311738121)$$ $$f(80782,33461)=(5406093003,5406093004,7645370045)$$ $$f(195025,80782)=(31509019101,31509019100,44560482149)$$ $$f(470832,195025)=(183648021599,183648021600,259717522849)$$ $$f(1136689,470832)=(1070379110497,1070379110496,1513744654945)$$ $$f(2744210,1136689)=(6238626641379,6238626641380,8822750406821)$$ $$f(6625109,2744210)=(36361380737781,36361380737780,51422757785981)$$ $$f(15994428,6625109)=(211929657785303,211929657785304,299713796309065)$$

poetasis
  • 6,795