In this post we give a number theory proof of the following identity
(Prerequisite: knowing how factoring works in .)
Step 1: Approximate the sum with a finite sum.
We claim that
(Bear with me… this is the most technical part of the proof.) Indeed, we have
(Note we used the trivial bound 2 on each term in the first sum and telescoped the last sum.)
Step 2:
where denotes the number of divisors of that are congruent to modulo 4.
Indeed, the LHS equals
The term counts the number of multiples of less than , so counts the number of pairs where and is a multiple of . Summing the number of such pairs over instead we get . Similarly, .
Step 3: is the number of integer solutions to .
One proof of this uses Jacobi’s triple product identity (see http://www.jstor.org/pss/2323169). We give a proof using Gaussian integers.
Each solution to corresponds to a factoring over the Gaussian integers . Thus the number of solutions is the number of such that , or 4 times the number of nonassociated such that . (Two Gaussian numbers are associated if they differ by a unit , so are considered the same.)
Now factor where and are primes congruent to 1, 3 modulo 4, respectively. From knowledge of factoring in we know that

2 ramifies in , that is, it is the product of two associated primes .

The split, that is, where is prime in and not associated to .

The remain prime.
Now if and a Gaussian prime divides , then its conjugate must divide . Thus, since we have unique factorization in , each such , up to multiplication by associates, corresponds to a way of splitting the prime factors of into complex conjugate pairs. We note the following:

The factors are their own conjugates, so and must each get . If one of the is odd there is no solution. So we suppose they are all even.

It doesn’t matter how the prime factors of are split since they are all associates.
 There are ways to split the factors of , since we can have either , or ,… or divide . Thus there are solutions to up to associates.
Now if is odd, then the number of factors that are congruent to 1 or 3 modulo 4 are the same: Indeed, for every factor having an even power of , we can pair it up with the factor , and these two factors are different modulo 4.
If all the are even, then we claim . We induct on the number of 3mod4 factors . For the case , all odd factors of are 1 mod 4, and has odd factors. For the induction step, note that each 1mod4 factor of is obtained by multiplying an even power of (there are choices since is even) by a 1mod4 factor of , or multiplying an odd power of (there are choices) by a 3mod4 factor. Hence . We get a similar formula for . Thus
by the induction hypothesis.
Thus in either case, the number of solutions to equals the .
Step 4: Counting lattice points in circles
From step 3, we now know
is the number of integer solutions to , i.e. the number of lattice points in the circle centered at the origin with radius excluding the origin. The area formula for the circle gives that there are around lattice points inside, so , which together with steps 12, complete the proof.
Note to make the above geometric argument rigorous, for each lattice point in the circle, shade the square with opposite corners and . Then every point in the circle with radius is shaded (since the square that contains the point is entirely within the original circle) and no point outside the circle with radius is shaded (since the square that contains the point is entirely outside the original circle). The area of the shaded region is . Hence which gives the desired after dividing by and taking the limit.
(Note: The regular calculus proof can be found at http://en.wikipedia.org/wiki/Leibniz_formula_for_pi.)
On a deeper level we can see this as a special case of the analytic class number formula. See lecture 3 of http://math.uchicago.edu/~chonoles/expositorynotes/promys/promys2012analyticclassnumberformulanotes.pdf and http://math.stackexchange.com/questions/292104/howtoderivetheclassnumberformula
By: holdenlee on March 11, 2014
at 11:43 am
And step 3 is the identity zeta(s)L(s,(*/4))=zeta_{Q(i)}(s).
By: holdenlee on March 11, 2014
at 11:47 am
[…] proved this identity in a post several years ago on Number Theory and Pi. It turns out that this is a special case of a more general identity called the analytic class […]
By: Analytic Class Number Formula  Mental Wilderness on June 27, 2014
at 2:51 pm
I am now not sure the place you’re getting your information, however great topic.
I must spend some time learning much more or understanding more.
Thank you for fantastic info I was on the lookout for this information for
my mission.
By: test on November 18, 2014
at 3:07 pm
pls i nid more explaination on it
By: omooye on February 14, 2018
at 7:32 am