number of primitive Pythagorean triangles whose hypotenuses do not exceed n?

i just read "mathematical constants" book;

it said that Lehmer proved the following theorem in 1900

where P_h(n) , P_p(n) is number of primitive Pythagorean triangles whose hypotenuses and perimeter do not exceed n respectively.

is there any simple proof for those beautiful results? Specially The first one!

thanks to @BarryCipra

it was AWESOME

the sketch of proof without technical details is:

consider :

$a=m^2+n^2$

$b= m^2-n^2$

$c= 2mn$

it should be $m>n>0$ and $gcd(m,n)=1$ also $m,n$ has not the same parity.

if we want $hyp=a<N$ it must be $m^2+n^2<N$ so $m,n$ lies in a quarter of the circle with radius $\sqrt{N}$ and below the line $y=x$ whose area is equal to $$\frac{N\pi}{8}$$

Now the probability of $gcd(m,n)=1$ is equal to $\frac{6}{\pi^2}$ and the probability of both of m,n are not odd conditioned to be coprime is 2/3

So, the piece of Cake!

We Have:

$$\frac{N\pi}{8} \times \frac{6}{\pi^2} \times \frac{2}3=\frac{N}{2\pi}$$

Pyth Triangle with Hyp < N