# For which n are there primitive Pythagorean triples with legs of lengths a and a+n?

For which n can $a^{2}+(a+n)^{2}=c^{2}$ be solved, where $a,b,c,n$ are positive integers? I have found solutions for $n=1,7,17,23,31,41,47,79,89$ and for multiples of $7,17,23$... Are there infinitely many prime $n$ for which it is solvable?

-
The title says "primitive", so $GCD(a,n,c)=1$ is assumed? –  pharmine Oct 7 '11 at 12:35
@Angela: Very interesting question! –  rubik Oct 7 '11 at 12:39

The general primite solution to $x^2+y^2 = z^2$ is given by: $x=u^2-v^2$, $y=2uv$, $z=u^2+v^2$, with $u,v$ relatively prime and not both odd.

For $(a,a+n,z)$ to be a primitive triple, we'd have to have a $(u,v)$ such that: $|u^2 - v^2 - 2uv| = n$. We can rewrite that as: $(u-v)^2 - 2v^2 = \pm n$

So, setting $w = u-v$, we want to find $(w,v)$ which are relatively prime and $w$ is odd, with:

$$w^2-2v^2 = \pm n$$

This means that $n$ must be odd.

In fact, we can use unique factorization in $\mathbb{Z}[\sqrt{2}]$ to show that $n$ can be any product of primes of the form $8k\pm 1$. Since there are infinitely many primes of the form $8k\pm 1$, the answer to your question is, "yes."

(Oh, and once you find one solution $(w,v)$ for a particular $n$, you can find infinitely many solutions for that $n$.)

-
For example, $-71 = w^2 - 2v^2$ has solution $(w,v)=(1,6)$. So $u=7$, $x=u^2-v^2 = 13$, $y=2uv=84$, and $z=u^2+v^2=85$, so $n=71$ has a solution with $a=13$. –  Thomas Andrews Oct 7 '11 at 19:01

$2a^{2}+2na+n^{2}=c^{2}$ --> $a=-\frac{-n+\sqrt{2c^{2}-n^{2}}}{2}$ --> there are solutions iff $x^{2}+n^{2}=2c^{2}$ has solutions --> find the set of the squares of all integers 0 in the set such that $y=2x-n$ then there is a primitive pythagorean triple with a difference of n between legs, and also for any multiple An if n>1 since if $k^{2}\equiv x(\mod{n})$ then $(Ak)^{2} \equiv Ax(\mod{An})$ --> $Ay=2Ax-An$.

-

If you solve expression for $n$ you get

$n=\sqrt{c^2-a^2}-a$, let's denote $b=\sqrt{c^2-a^2}$,so we have that $n=b-a$

Now,take look at picture bellow.Note that $AD=a$,and $BD=b-a=n$

If you change value of $b$ and keep $a$ to be constant you will get a infinite number of right triangles,and therefore infinite number of values of $n=b-a$,so answer is yes, there are infinitely many primes $n$ for which equation is solvable.

-
Except that you don't know for which integer values of $b$ yield integer values of $c$. –  Thomas Andrews Oct 7 '11 at 14:57
@Thomas,That's true,I have answered only on second part of the question...however, one can find one (a,b,n) triple and then for each different triple choose another b such that n becomes prime number –  pedja Oct 7 '11 at 15:18
So, what does your argument say when $n=3$? –  Thomas Andrews Oct 7 '11 at 15:33
@Thomas,I didn't say that this reasoning is correct for each prime number.I just pointed that there is infinitely many distinct (a,b,n) triples such that n is prime... –  pedja Oct 7 '11 at 15:48