Most of the work was already done in this video:

https://www.youtube.com/watch?v=NaL_Cb42WyY

The whole video is actually a pretty neat proof of pi/4 = 1 - 1/3 + 1/5 - ... and I recommend watching it. But the specific result I'll use is that the number of lattice points a distance sqrt(N) from the origin is 4 times sum of X(k) over all k|N, where

Code: Select all

```
X(k) = 0 if k mod 4 = 0, 2
1 if k mod 4 = 1
-1 if k mod 4 = 3
```

Code: Select all

```
Max. heat
inf
----- -----
\ 1 \
= > --------- * 4 > X(k)
/ sqrt(N)^4 /
----- -----
N=1 k|N
inf
----- -----
\ \ 4*X(k)
= > > ------
/ / N^2
----- -----
N=1 k|N
Since (N,k) run over all solutions of N=jk over the natural numbers, rewrite as
inf inf
----- -----
\ \ 4*X(k)
= > > ------
/ / (jk)^2
----- -----
j=1 k=1
inf inf
----- -----
\ 1 \ X(k)
= 4 > --- > ----
/ j^2 / k^2
----- -----
j=1 k=1
= 4 * (pi^2 / 6) * G
```