Solutions for Euclid's formula concerning a prime leg

75 Views Asked by At

In completing questions regarding primitive pythagorean triples and solving for the values $u, v$ in Euclid's formula, $$u^2-v^2, 2uv, u^2+v^2$$ I noticed that when the first of the triple, i.e. $u^2-v^2$, is prime, the solution of $u$ and $v$ is seemingly trivial.

For example, take the prime 89, divide by 2, resulting in $44$ remainder 1. Now you have a "bigger half" of $45$ and a "smaller half" of $44$. Simply input these values as $u$ and $v$ (where $u > v$). Voila, you have a pythagorean triple. I've only tested this so many times on different primes, even seeing it work on composites.

What I don't understand is the (potentially very obvious and very simple explanation) as to why this works. I'm not sure what to google, or at least my attempts have failed spectacularly, but I'm assuming this is a known property (?). Or at least it's just completely false and I got lucky in some tests.

Thanks all the same for any explanations.

5

There are 5 best solutions below

0
On BEST ANSWER

… even seeing it work on composites.

I assume that all (or atleast most) of the composite numbers you’ve experimented with have been odd numbers. I will come to that in a while.

We know that a prime number has only two divisors, 1 and itself. This means that if we have two distinct positive factors multiplying to give a prime $p$ then IT MUST SO HAPPEN that one of the factors is $1$ and the other is $p$.

Let us have $u^2-v^2=p$ where $p$ is an odd prime (The case $p=2$ can be dealt separately). Then, $$(u-v)(u+v)=p$$ so that one of the factors is equal to $1$. But $u-v$ is smaller than $u+v$ so we have $$u-v=1,$$$$u+v=p$$ which on solving gives us $\ \displaystyle u=\frac{p+1}{2}, \ v=\frac{p-1}{2}$. As you can notice, these are very close to $\dfrac p2$.

Now to why I made my initial comment: If you notice, then composite numbers, say $s$, can also be written as $s\cdot1$ and the previous calculation redone. But then, $s\pm1$ would have to be divisible by $2$ for the two numbers to be integers; this implies that $s$ must be odd to get integer solutions with the method you’ve described.

0
On

Think difference of two squares:

$45^2-44^2=(45+44)(45-44)=89\cdot 1=89$, giving you your leg of $89$. Same idea would work for getting any odd leg, prime or not.

2
On

Addendum added to respond to the comment question of anticontradictory.


Take any odd number, prime or composite, of form $(2n + 1).$

Set $u = n+1, v = n.$

Then

  • $u^2 - v^2 = 2n+1.$

  • $2uv = 2n^2 + 2n.$

  • $u^2 + v^2 = 2n^2 + 2n + 1.$

Then

$$(u^2 - v^2)^2 + (2uv)^2$$

$$= (4n^2 + 4n + 1) + (4n^4 + 8n^3 + 4n^2)$$

$$= (4n^4 + 8n^3 + 8n^2 + 4n + 1)$$

$$= (2n^2 + 2n + 1)^2 = (u^2 + v^2)^2.$$


Addendum
Responding to the comment question of anticontradictory

I noticed that when the first of the triple, i.e. $u^2-v^2$, is prime, the solution of $u$ and $v$ is seemingly trivial.

I'm confused as to why you have squared the two terms and added them. It then following I don't understand your conclusion. What is the significance of $(u2+v2)^2$?

Your posting indicated (in effect) that when $(u^2 - v^2)$ was (an odd) prime, that you could then construct a right triangle, with each side having an integer length, and (in effect) with the sides given by

$$(u^2 - v^2), (2uv), (u^2 + v^2).$$

In particular, you indicated that a trivial solution for $u,v$ was given by

$$u = (n+1), ~v = (n), ~: ~~\text{the prime equals}~~ (2n+1).$$

The whole point of my answer, up to the Addendum, was to demonstrate that while your assertion is accurate, the fact that $(2n+1)$ is prime is totally irrelevant.

The method that I chose to demonstrate this was to assume that $(2n+1)$ was any odd number. I then demonstrated that the trivial solution of

$$u = (n+1), ~v = (n)$$

still applied. In order to demonstrate this, I explicitly calculated the three side lengths of the triangle in terms of $n$.

Then, I algebraically demonstrated that the sum of the squares of the two legs did in fact equal the square of the longer side. This algebraic demonstration verified that the three sides did in fact represent a right triangle, with integer sides.

This is why I expressed $~(u^2 - v^2)~$ and $~(2uv)~$ in terms of $~n$,
squared them, and then showed that the sum equaled
$(u^2 + v^2)^2 ~$ (also expressed in terms of $~n$).

0
On

Suppose $a^2+b^2=c^2$ where $a$ is an odd prime (no Pythagorean triple can have $2$ among the terms). Then $$ a^2=(c-b)(c+b) $$ Since $a$ is prime, we have very few possibilities, namely

  1. $c-b=1$ and $c+b=a^2$, or
  2. $c-b=a$ and $c+b=a$.

In the second case we have $2c=2a$, so $c=a$ and $b=0$: not a Pythagorean triple case.

In the first case $c=b+1$ and so $a^2=2b+1$. Take any odd integer $a$ and write $a^2=2b+1$; then we obtain a Pythagorean triple with $c=b+1$, because $$ a^2+b^2=b^2+2b+1=(b+1)^2=c^2 $$ so this isn't a very special case: whether $a$ is prime or not is irrelevant.

Is there something special when $a$ is an odd prime? We need to know about the representation of primitive Pythagorean triples, namely that there are $u,v$ such that $a=u^2-v^2$, $b=2uv$ and $c=u^2+v^2$.

If $a$ is prime then from $a=(u-v)(u+v)$ we derive $u-v=1$ and so $a=2v+1$. Hence $b=2v(v+1)=2v^2+2v$ and so $$ a^2=4v^2+4v+1=2b+1 $$ No, nothing really special, if not for the fact that $$ u=\frac{a+1}{2},\qquad v=\frac{a-1}{2} $$ so we can write $$ b=\frac{a^2-1}{2},\quad c=\frac{a^2+1}{2} $$ OK, let's try with any odd integer $a$: $$ a^2+\Bigl(\frac{a^2-1}{2}\Bigr)^2=\frac{4a^2+a^4-2a^2+1}{4}=\frac{(a^2+1)^2}{4}=\Bigl(\frac{a^2+1}{2}\Bigr)^2 $$ No, nothing really special again.

0
On

Side=A of a Pyathagorean triple can be any odd number greater than one, i.e. $\space A=2n+1,\space\space n=\in\mathbb{N}.\quad$ For primitive Pythagorean triples generated with Euclid's formula $$A=u^2-v^2,\quad B=2uv,\quad C=u^2+v^2$$ the only restrictions are that $\space u,v\in\mathbb{N}, \space\space u>v, \space\space GCD(u,v)=1.\quad$ Every prime number greater than $\space2,\space$ when divided by $\space2,\space$ can yield $\space u=v+1.\space$ Using these facts, we can see that every prime except $\space2\space$, divided by $\space2\space$ can yield a $\space u,v\space$ pair that can be used to generate a primitive Pythagorean triple. Examples are

\begin{align*} 3&\longrightarrow f(2,1)=(3,4,5)\\ 5&\longrightarrow f(3.2)=(5,12,13)\\ 7&\longrightarrow f(4.3)=(7,24,25)\\ 11&\longrightarrow f(6,5)=(11,60,61)\\ 13&\longrightarrow f(7,6)=(13,84,85) \end{align*} This is a subset of $\space Set_1\space$ generated by the formula \begin{align*} &A=(2n-1)^2+&&2(2n-1)k\\ &B= &&2(2n-1)k+2k^2\\ &C=(2n-1)^2+&&2(2n-1)k+2k^2 \end{align*} as shown in the table below. \begin{array}{c|c|c|c|c|c|} n & k=1 & k=2 & k=3 & k=4 & k=5 \\ \hline Set_1 & 3,4,5 & 5,12,13& 7,24,25& 9,40,41& 11,60,61 ] \\ \hline Set_2 & 15,8,17 & 21,20,29 &27,36,45 &33,56,65 & 39,80,89 \\ \hline Set_3 & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 & 75,100,125 \\ \hline Set_{4} &63,16,65 &77,36,85 &91,60,109 &105,88,137 &119,120,169 \\ \hline Set_{5} &99,20,101 &117,44,125 &135,72,153 &153,104,185 &171,140,221 \\ \hline \end{array}