TITLE: Is there any formula to find number of Pythagorean triplets between two integers 2 and j, j>2?
QUESTION [9 upvotes]: Given $j \geq 5$, is there a formula for the number of Pythagorean triplets $(a, b, c)$ satisfying the constraint that $a, b, c \leq j$?
There exists at least one Pythagorean triplet for $j\geq5$; the question is how to find the exact number of Pythagorean triplets for large $j$.

REPLY [7 votes]: The question here was studied (in a slightly more generalized version) by Sierpinski (1906) in Polish; asymptotics were found by Fricker (1977, 1982) and Fischer (1979) both in German; and an unconditional upper bound was established by Stronina (1969) in Russian. 
As for English, you can find these references (and others) in, for example, the paper:

Nowak, W. G., & Recknagel, W. (1989). The distribution of Pythagorean triples and a three-dimensional divisor problem. Math. J. Okayama Univ, 31, 213-220. Link (no paywall).

Here is an excerpt from the first page:

The reference here comes from backtracking; first:

Benito, M., & Varona, J. L. (2002). Pythagorean triangles with legs less than n. Journal of computational and applied mathematics, 143(1), 117-126. Link (no paywall).

In there, the authors point to an earlier paper (p. 118):

Kühleitner, M. (1993, December). An omega theorem on Pythagorean triples. In Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg (Vol. 63, No. 1, pp. 105-113). Springer Berlin/Heidelberg. Link.

The last paper is, unfortunately, only visible as a preview; but it is written in English (despite the German title) and contains a reference to the Nowak and Recknagel paper excerpted above.