Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the function $Pt(n)$. It tells us how many primitive Pythagorean Triples there are (below $n$) when any argument $n \in \mathbb{N}$ is plugged in. Is there an 'exact formula'; i.e. an elementary function of even a combination of known special functions like the Gamma and Error Function, that describes $Pt(n)$ ?


Edit: I'm also interested in the exact value of the limit of $Pt(n)/n$ when $n$ tends to infinity.

share|cite|improve this question
You need to be more specific in your question: what do you mean by 'below n'; with largest element <n, with sum of elements <n, etc? Also, your second question should be restricted to primitive pythagorean triples, as otherwise the answer is no, and in fact it may tend to infinity as n goes to infinity! For instance, the multiples of the core (3, 4, 5) triple mean that the density is at least 1/5, and I would bet that the number of (not necessarily primitive) triples with largest element <n is proportional to n^2. – Steven Stadnicki Oct 12 '10 at 20:38
A pythagorean triple is 3 numbers, what does it mean for that to be "below n"? – anon Oct 12 '10 at 20:39
It is not clear (ever) what is meant by "exact formula". – anon Oct 12 '10 at 20:40
@Steven Stadnicki and muad: wooops! Should have been more careful. The largest element should be smaller than n. I'm also talking about primitive Pythagorean Triples. By an 'exact formula' I was thinking about an elementary function (see or a some (combination of) special function(s) like the Gamma function and the error function. I'll put it in the question. – Max Muller Oct 12 '10 at 20:51
up vote 3 down vote accepted

To answer the sharpened version of the question I suggested (the number of primitive Pythagorean triples with largest element ${\lt}n$ ): by the parametrization of pythagorean triples as sums of two squares, this is (essentially) equal to the question of how many ways there are of expressing all the odd numbers ${\lt}n$ as a sum of two squares. Mathworld's page on the sum-of-two-squares function at indicates that this is proportional to $n$ (though it might take some work to explicitly work out the constant of proportionality for the odd case), and so in fact your intuition is wrong; the limit you suggest tends to a finite positive value.

share|cite|improve this answer
Ok, Thanks mister Stadnicki. I have just found this , which may help to determine the finite positive value. – Max Muller Oct 12 '10 at 20:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.