# Number of Pythagorean Triples under a given Quantity

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)$ ?

Max

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

-
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 en.wikipedia.org/wiki/Elementary_function) 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

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 http://mathworld.wolfram.com/SumofSquaresFunction.html 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.