# Mersenne primes and the area of primitive pythagorean triangles

A triple $\left ( a,b,c \right )$ of positive integers, with $a,b, is called pythagorean triple; that is  the lengths of the sides of pythagorean triangles, if and only if

$a^{2}+b^{2}= c^{2}$.

A pythagorean triangles is primitive if $a, b$ and $c$ are relatively prime, so that :

$a= m^{2}-n^{2},~~~b= 2mn,~~~c= m^{2}+n^{2}$

There is a method of finding primitive pythagorean triangles using Gaussian integers $\mathbb{Z}[i]$. [2]

Let $\displaystyle a^2+b^2=c^2$ where $a,\,b$, and $c$ are pairwise, relatively prime, positive integers. Let $z=a+bi$ and $\bar{z}=a-bi$, where $i=\sqrt{-1}$. Then $z$ and $\bar{z}$ are Gaussian Integers, and $\bar{z}$ is the conjugate of $z$. Note that

$\displaystyle a=\frac{z+\bar{z}}{2},\quad b=\frac{z-\bar{z}}{2i}\,,$   and $\displaystyle \quad c=\sqrt{z\bar{z}}.$

Since $\gcd(a,b)=1$ then $\gcd(z,\bar{z})=1$. Hence each of $z$ and $\bar{z}$ is a square. That is, there exists integers $m$ and $n$ such that $(m+ni)^2=z$ and $(m-ni)^2=\bar{z}$. So,

$\displaystyle a =\frac{(m+ni)^2+(m-ni)^2}{2}=m^2-n^2,$

$\displaystyle b =\frac{(m+ni)^2-(m-ni)^2}{2i}=2mn,$

$\displaystyle \quad c =\sqrt{(m+ni)^2(m-ni)^2}=m^2+n^2.$

Since $a$ is a positive integer, $m$ and $n$ must be positive integers, $m > n$. And since $\gcd(a,b)=1$, $m$ and $n$ must be relatively prime and of opposite parity. We have the identity,

$\displaystyle \left\vert \frac{z^{2k}+\bar{z}^{2k}}{2}\right\vert^2+\left\vert \frac{z^{2k}-\bar{z}^{2k}}{2i}\right\vert^2 =\Bigl(\left(z\bar{z}\right)^k\Bigr)^2.$

The absolute values are necessary since the terms on the left, depending on $k$, may, or may not, be positive.

When the hypotenuse is to a power of the form $c^{2^j}$, where $j$ is a non-negative integers, then there exists positive integers $u$ and $v$ such that :

$\displaystyle u=\left\vert\frac{z^{2^j}+\bar{z}^{2^j}}{2}\right\vert=\left\vert\frac{(u+vi)+(u-vi)}{2}\right\vert,$ and $\displaystyle \quad v=\left\vert\frac{z^{2^j}-\bar{z}^{2^j}}{2i}\right\vert=\left\vert\frac{(u+vi)-(u-vi)}{2i}\right\vert.$

Note that, if $u < v$ then interchange the labels. Clearly, $\gcd(m,n)=1$ implies $\gcd(u,v)=1$. The parameters $m$ and $n$ have opposite parity. Therefore $2\nmid \left(m^2+n^2\right)^{2^j}=u^2+v^2$. Hence $u$ and $v$ have opposite parity.

Thus, all primitive Pythagorean triples of the form $\left(a,b,c^{2^j}\right)$ are given by  the parametric equations :

$\displaystyle a=u^2-v^2=\left\vert\frac{(m+ni)^{2^{j+1}}+(m-ni)^{2^{j+1}}}{2}\right\vert,$

$\displaystyle b=2uv=\left\vert\frac{(m+ni)^{2^{j+1}}-(m-ni)^{2^{j+1}}}{2i}\right\vert,$

and $\displaystyle c^{2^j}=u^2+v^2=\left(m^2+n^2\right)^{2^j}.$

Then

$\displaystyle 2ab=\left\vert\frac{(m+ni)^{2^{j+2}}-(m-ni)^{2^{j+2}}}{2i}\right\vert.$

Barnes[1] showed that if $\left(a,b,c^{2^j}\right)$ is a solution to a primitive Pythagorean triangle, where $j$ is a non-negative integer, then every Mersenne prime less than or equal to $\left(2^{j+2}-1\right)$ divides $ab$. This imples that the area of the primitive pythagorean triangle is a multiple of the perfect number.

Let $t$ be a positive integer such that $2^{t+1}-1$ is a prime (Mersenne prime). And let $a^2+b^2=c^{2^t}$ be a primitive Pythagorean triangle. Then, the area $\frac{1}{2}\,ab$ is a multiple of the perfect number $2^t\left(2^{t+1}-1\right).$

Theorem 1

Let $a^2+b^2=\left(c^k\right)^2$ be a primitive Pythagorean triangle where $k \in \mathbb{Z}^+$. Let $d$ be a positive integer divisor of $k$. Let $p=4d-1$. If $p$ is a prime then $p\vert ab$.

Proof

Since $m+ni\in \mathbb{Z}[i]$, then

$\left((m+ni)^{\frac{k}{d}}\right)^{4d}=(M+Ni)^{4d}$

for some $M,N\in \mathbb{Z}$.

If $p=4d-1$ is a prime, then since $-i=i^{4d-1}=i^p$,

$\displaystyle p\vert(M+Ni)^p-(M-Ni)=\bigl((M+Ni)^p-M^p-(Ni)^p\bigr)+(M^p-M)-i(N^p-N)$.

Which implies

$\displaystyle p\vert(M+Ni)^{p+1}-\left(M^2+N^2\right)$.

Similarly,

$\displaystyle p\vert(M-Ni)^{p+1}-\left(M^2+N^2\right)$.

Which implies

$\displaystyle p\,\,$ divides $\displaystyle \,\,(M+Ni)^{p+1}-(M-Ni)^{p+1}=(m+ni)^{4k}-(m-ni)^{4k}=4abi$.

Therefore $p\vert ab$.

Corollary 1

Let $a^2+b^2=\left(c^{2^j}\right)^2$ be a primitive Pythagorean triangle where $j$ is a nonnegative integer. Let $M$ be any Mersenne prime less than or equal to $2^{j+2}-1$. Then

$M$ divides $ab$.

Proof

Let $k=2^j$ in theorem (1). Then

$\displaystyle d=\left\{\,2^0,\,2^1,\,2^2,\ldots ,2^{j-1},\,2^j\,\right\},$
$\displaystyle 4d-1=\left\{\,2^2-1,\,2^3-1,\,2^4-1,\ldots ,2^{j+1}-1,\,2^{j+2}-1\,\right\},$

From Theorem (1), every prime in the set $4d-1$ divides $ab$.

Theorem 2

If

$\displaystyle a^2+b^2=\left(c^{2^j}\right)^2$

is a primitive Pythagorean triangle where $j$ is a nonnegative integer then $2^{j+2}$ divides $ab$.

Proof

By induction on $j$ : If $j=0$ then $\displaystyle a^2+b^2=\left(c^{2^0}\right)^2=c^2$. So there exists integers $m$ and $n$, one odd the other even, such that $a=m^2-n^2$ and $b=2mn$. Hence $4=2^{0+2}$ divides $ab$. Assume true for $j$, then

$\displaystyle \left(c^{2^{j+1}}\right)^2=\left[\left(c^{2^j}\right)^2\right]^2=\left(a^2+b^2\right)^2=\left(a^2-b^2\right)^2+(2ab)^2$

Let $a_1=a^2-b^2$ and $b_1=2ab$. Then if $2^{j+2}$ divides $ab$, $2^{(j+1)+2}$ divides $a_1b_1$.

Perfect numbers and the area of primitive pythagorean triangles :

From corollary and theorem 2 we see that the area of the $3\--4\--5$ triangle, the smallest Pythagorean triangle, is $\frac{1}{2}\left(2^2-1\right)\left(2^2\right)=2^1\left(2^2-1\right)=6$, the smallest perfect number.

Let $t$ be a positive integer such that $2^{t+1}-1$ is a prime (Mersenne prime). And let $a^2+b^2=c^{2^t}$ be a primitive Pythagorean triangle. Then, the area $\frac{1}{2}\,ab$ is a multiple of the perfect number $2^t\left(2^{t+1}-1\right).$

Examples
$t=1$ : Two primitive Pythagorean triangles $3^2+4^2=5^{2^1}$ and $5^2+12^2=13^{2^1}$. Since $2^{1+1}-1=2^2-1=3$ is a prime, we know that each area must be a multiple of the perfect number $2^1\left(2^2-1\right)=6$. And indeed, $\frac{1}{2}\,(3)(4)=\mathbf{6}$ and $\frac{1}{2}\,(5)(12)=\mathbf{6}\,(5)$.

$t=2$ : Two primitive Pythagorean triangles $7^2+24^2=5^{2^2}$ and $119^2+120^2=13^{2^2}$. Since $2^{2+1}-1=2^3-1=7$ is a prime, we know that each area must be a multiple of the perfect number $2^2\left(2^3-1\right)=28$. And indeed, $\frac{1}{2}\,(7)(24)=\mathbf{28}\,(3)$ and $\frac{1}{2}\,(119)(120)=\mathbf{28}\,(255)$.

$t=4$ : Two primitive Pythagorean triangles $164833^2+354144^2=5^{2^4}$ and $815616479^2+13651680^2=13^{2^4}$. Since $2^5-1=31$ is a prime, we know that each area must be a multiple of the perfect number $2^4\left(2^5-1\right)=496$. And indeed, $\frac{1}{2}\,(164833)(354144)=\mathbf{496}\,(58845381)$ and $\frac{1}{2}\, (815616479)(13651680)=\mathbf{496}\,(11224329812535)$.

Note: Since $5^{2^4}=\left(5^8\right)^{2^1}=\left(5^4\right)^{2^2}$, $\frac{1}{2}\,(164833)(354144)$ is also a multiple of each of 6 and 28.

That is,

• If $a^2+b^2=c^2$ is a primitive Pythagorean triangle then its area is a multiple of the perfect number $\mathbf{6}$.
• If $a^2+b^2=c^4$ is a primitive Pythagorean triangle then its area is a multiple of each of the perfect numbers $\mathbf{6}$ and $\mathbf{28}$
• If $a^2+b^2=c^{16}$ is a primitive Pythagorean triangle then its area is a multiple of each of the perfect numbers $\mathbf{6},\,\mathbf{28}$, and $\mathbf{496}$
• If $a^2+b^2=c^{64}$ is a primitive Pythagorean triangle then its area is a multiple of each of the perfect numbers $\mathbf{6},\,\mathbf{28},\,\mathbf{496}$, and $\mathbf{8128}$.
• If $a^2+b^2=c^{4096}$ is a primitive Pythagorean triangle then its area is a multiple of each of the perfect numbers $\mathbf{6},\,\mathbf{28},\,\mathbf{496},\,\mathbf{8128}$, and $\mathbf{33550336}$
• And, in general, if $a^2+b^2=\left(c^{2^t}\right)$ is a primitive Pythagorean triangle where $2^{t+1}-1$ is a Mersenne prime then the triangle’s area is a multiple of each perfect number less than or equal to the perfect number $2^t\left(2^{t+1}-1\right)$.

References :

[1] Barnes, Fred. Primitive Pythagorean triangles where the hypotenuse is to a power, available at pythag.net/node6.html