Is there any formula to find number of Pythagorean triplets between two integers 2 and j, j>2? 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$.
 A: 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.
A: The problem is equivalent to asking for all Pythagorean triples with bounds on the hypotenuse and a variant of that problem is treated in the article ENUMERATION OF ALL PRIMITIVE PYTHAGOREAN TRIPLES WITH HYPOTENUSE LESS THAN OR EQUAL TO N 
A simple estimate for the number of primitive Pythagorean triples is due to Lehmer: it is less than $N/2\pi$  
Turning to the original problem of enumerating all triples, the following observation helps:
$a^2+b^2=c^2 \implies a=2uv, b=v^2-u^2, c=u^2+v^2; u\le v$
which leads to the problem of finding $\frac{1}{8}\sum_{i=1}^{n}r(i)$, where $r(i)$ is the number of ways to write $i$ as the sum of two squares of signed integers (cf e.g. wolfram ).  
The answer is then the aforementioned sum $\frac{1}{8}\sum_{i=1}^{n}r(i)$
