# Find all primitive Pythagorean triples such that all three sides are on an interval $[2000,3000]$

For primitive Pythagorean triples $(a,b,c)$, the following is valid: $$a=m^2-n^2,b=2mn,c=m^2+n^2$$ or $$b=m^2-n^2,a=2mn,c=m^2+n^2$$

$gcd(m,n)=1,m>n$

If numbers $a,b,c$ are relatively prime, then $(a,b,c)$ is a primitive Pythagorean triples, otherwise it is not primitive.

For all Pythagorean triples (not only for primitive, where $gcd(a,b,c)=1$), the following is valid: $$(d(m^2-n^2))^2+(2dmn)^2=(d(m^2+n^2))^2$$

If we would have one fixed side, then we would factorize the it's size and consider the number of cases which is equal to the number of factors in the fixed side.

Here, we are given that every side is on an interval $[2000,3000]$.

What is the method to find all primitive Pythagorean triples in this case?

• There are not too many choices for $c$. It need to be at least $\left\lceil 2000\sqrt{2}\right\rceil = 2829$, must have the form $4k+1$ and when you factor it into prime factors, it cannot contains primes of the form $4k+3$. If I didn't make any mistake, you are leave with $18$ numbers to check: $$2833, 2837, 2845, 2857, 2861, 2873, 2885, 2897, 2909, \\ 2917, 2929, 2941, 2953, 2957, 2965, 2969, 2977, 2993$$ Among them, only $2941^2 = 2059^2 + 2100^2$ fit the bill (by brute-force and by this calculator) – achille hui Nov 23 '16 at 20:58
• @user300047 I edited my answer to include an explanation of where these functions came from. My posts that include them almost always get downvoted but I would like you to verity for yourself whether or not these functions are valid and provide the answer you seek. – poetasis yesterday

The only primitive triple that meets your requirements is: $$f(n,k)=f(15,21)=(2059,2100,2941), GCD(A,B,C)=1$$ generated by unconventional functions that I developed by gleaning the results of 8 million spreadsheet formulas and proved, in a paper, to generate all primitives that exist plus $$some$$ triplets that are odd square multiples of primitives. These functions are unpopular in this venue but they work, in some ways, better than Euclid's formula because they produce a valid triplet for every pair of natural numbers in a pattern of sets that lets the user know if and when all possibilities have been exhausted. The functions are: $$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$$
I do not believe others exist as primitives. To exist, the ratio of the hypotenuse to the smallest leg must be $$1.5:1$$ or less. Then some integer multiple of the shortest leg must be greater than $$2000$$ and the same integer multiple of the hypotenuse must be less than $$3000$$.
for non-primitives you have $$f(2,2)=(21,20,29)\text{ times 100}$$ $$f(4,5)=(119,120,169)\text{ times }17$$ $$f(6,7)=(275,252,373)\text{ times } 8$$ $$f(6,8)=(297,304,425)\text{ times } 7$$ $$f(8,10)=(525,500,725)\text{ times }4$$ $$f(9,12)=(697,696,985)\text{ times }3$$ $$f(10,15)=(931,1020,1381)\text{ times }2$$