Circles all the way down

The Riemann hypothesis and other applications of the zeta function

October 14, 2025 · John Peach

Ask NotebookLM

Great fleas have little fleas upon their backs to bite ‘em,
And little fleas have lesser fleas, and so ad infinitum.
And the great fleas themselves, in turn, have greater fleas to go on;
While these again have greater still, and greater still, and so on.

Figure 1.

An infinite sequence of circles.

Suppose two circles with radius 11 are just touching, and between them is a smaller (yellow) circle exactly fitting between them, an even smaller (blue) circle that touches the large circle on the right and the yellow circle, and so on. What is the total combined area of the circles?

The answer to this will take us to the zeta function, which connects geometry to prime numbers, quantum physics, and patterns in nature. It is the basis of the Riemann hypothesis about the distribution of prime numbers, appears in Planck’s blackbody radiation law and the Stefan-Boltzmann Law (see Economics and the Stefan Boltzmann Law and Stefan-Boltzmann Revisited), and provides a new perspective on the Cesàro sum we considered earlier in Extending Time where we saw a link to the physics of string theory.

Pell’s equation, introduced in Haven’s Haven, is a result in number theory that has connections to the zeta function, while Zipf’s Law, which governs word frequencies and city populations, can be viewed as a probability distribution when normalized by the zeta function. Seemingly unrelated problems across mathematics and physics often share deep underlying connections, with the zeta function serving as the thread that ties them together.

The geometry problem

Let’s start with the yellow circle with an unknown radius, r2r_2.

Figure 2.

The yellow circle, r2r_2.

If we construct a triangle with vertices E,G,HE,G,H such that EHG\angle EHG is a right angle, then the length of the bottom side k=EH=1k = \overline{EH} = 1 since it is the radius, r1,r_1, of the large circle, the length of the side HG=1r2\overline{HG} = 1 - r_2 and the hypotenuse EG=r1+r2=1+r2.\overline{EG} = r_1+r_2 = 1 + r_2. From the Pythagorean theorem,

EH2+HG2=EG212+(1r2)2=(1+r2)21+12r2+r22=1+2r2+r2212r2=2r21=4r2r2=14.\begin{aligned} \overline{EH}^2 + \overline{HG}^2 &= \overline{EG}^2 \\ 1^2 + (1-r_2)^2 &= (1 + r_2)^2 \\ 1 + 1 - 2r_2 + r_2^2 &= 1 + 2r_2 + r_2^2 \\ 1 - 2 r_2 &= 2 r_2 \\ 1 &= 4 r_2 \Rightarrow r_2 = \frac{1}{4}. \end{aligned}

Now, let’s add the blue circle tucked in between the large circle and the yellow circle. The center of the blue circle is J=(x3,r3).J = (x_3,r_3).

Figure 3.

Locating the center of the blue circle.

We don’t know the coordinates of the blue circle yet, but we have two right-angle triangles. The first is EOJ\triangle{EOJ} and the second is JPG.\triangle{JPG}. From the first triangle,

(r2+r3)2=(r2r3)2+x32r22+2r2r3+r32=r222r2r3+r32+x322r2r3=2r2r3+x324r2r3=x32.\begin{aligned} (r_2 + r_3)^2 &= (r_2 - r_3)^2 + x_3^2 \\ r_2^2 + 2r_2 r_3 + r_3^2 &= r_2^2 - 2r_2 r_3 + r_3^2 + x_3^2 \\ 2r_2 r_3 &= -2r_2 r_3 + x_3^2 \\ 4r_2 r_3 &= x_3^2. \end{aligned}

Since we found that r2=14r_2 = \frac{1}{4}, then r3=x32.r_3 = x_3^2. Using the Pythagorean theorem on JPG\triangle{JPG} and recalling that r1=1,r_1 = 1,

(r1+r3)2=(1x3)2+(1r3)2r12+2r1r3+r32=xR2+12r3+r321+2r3+r32=xR2+12r3+r324r3=xR2=(1x3)24x32=12x3+x323x32+2x31=0x3=2±4+126=2±46=13,1.\begin{aligned} (r_1 + r_3)^2 &= (1-x_3)^2 + (1 - r_3)^2 \\ r_1^2 + 2r_1 r_3 + r_3^2 &= x_R^2 + 1 - 2 r_3 + r_3^2 \\ 1 + 2 r_3 + r_3^2 &= x_R^2 + 1 - 2 r_3 + r_3^2 \\ 4 r_3 &= x_R^2 = (1-x_3)^2\\ 4 x_3^2 &= 1 - 2 x_3 + x_3^2 \\ 3 x_3^2 + 2 x_3 - 1 &= 0 \\ x_3 &= \frac{-2 \pm \sqrt{4 +12}}{6} = \frac{-2 \pm 4}{6} = \frac{1}{3},-1. \end{aligned}

For convenience, let xR=(1x3)x_R = (1-x_3) be the distance along the xx-axis from the center of the blue circle to the right edge of the square. Apply the substitution r3=x32r_3 = x_3^2 in the second-to-last step, and since x3x_3 represents a distance, we can discard the negative root, so x3=13.x_3 = \frac{1}{3}.

First Circles

Figure 4.

The radius and position of the n+1n+1 circle.

Suppose we know the position on the xx-axis of the nthn^{th} circle, and we know the radius rnr_n. Using the method above, can we find the coordinates of the center of the next circle, (xn+1,rn+1)?(x_{n+1},r_{n+1})? We have two formulas using the Pythagorean theorem from the previous circle and from the first, large circle. The first,

(rnrn+1)2+(xn+1xn)2=(rn+rn+1)2rn22rnrn+1+rn+12+(xn+1xn)2=rn2+2rnrn+1+rn+12(xn+1xn)2=Δxn+12=4rnrn+1.\begin{aligned} (r_n - r_{n+1})^2 + (x_{n+1} - x_n)^2 &= (r_n + r_{n+1})^2 \\ r_n^2 - 2r_n r_{n+1} + r_{n+1}^2 + (x_{n+1} - x_n)^2 &= r_n^2 + 2r_n r_{n+1} + r_{n+1}^2 \\ (x_{n+1} - x_n)^2 &= \Delta x_{n+1}^2 = 4r_n r_{n+1}. \end{aligned}

The second uses the original large semicircle and the new circle,

(1xn+1)2+(1rn+1)2=(1+rn+1)212xn+1+xn+12+12rn+1+rn+12=1+2rn+1+rn+1212xn+1+xn+12=4rn+1=Δxn+12rn=(xn+1xn)2rnrn2rnxn+1+rnxn+12=(xn+1xn)2rn2rnxn+1+rnxn+12=xn+122xn+1xn+xn2(rn1)xn+12+2(xnrn)xn+1+(rnxn2)=0.\begin{aligned} (1 - x_{n+1})^2 + (1 - r_{n+1})^2 &= (1 + r_{n+1})^2 \\ 1 - 2x_{n+1} + x_{n+1}^2 + 1 - 2r_{n+1} + r_{n+1}^2 &= 1 + 2r_{n+1} + r_{n+1}^2 \\ 1 - 2x_{n+1} + x_{n+1}^2 &= 4 r_{n+1} = \frac{\Delta x_{n+1}^2}{r_n} = \frac{(x_{n+1} - x_n)^2}{r_n} \\ r_n - 2 r_n x_{n+1} + r_n x_{n+1}^2 &= (x_{n+1} - x_n)^2 \\ r_n - 2 r_n x_{n+1} + r_n x_{n+1}^2 &= x_{n+1}^2 - 2 x_{n+1} x_n + x_n^2 \\ (r_n - 1) x_{n+1}^2 + 2 (x_n - r_n) x_{n+1} + (r_n - x_n^2) &= 0. \end{aligned}

Solving for xn+1x_{n+1}, the discriminant is Δ=4[(xnrn)2(rn1)(rnxn2)]=4rn(1xn)2\Delta = 4[(x_n - r_n)^2 - (r_n - 1)(r_n - x_n^2)] = 4r_n(1 - x_n)^2, so

xn+1=2(xnrn)±2rn(1xn)2(rn1)=(rnxn)±rn(1xn)rn1.x_{n+1} = \frac{-2(x_n - r_n) \pm 2 \sqrt{r_n}(1-x_n)}{2 (r_n - 1)} = \frac{(r_n - x_n) \pm \sqrt{r_n}(1 - x_n)}{r_n - 1}.

Since rnxnr_n \leq x_n and rn1<0r_n - 1 < 0 we can discard the negative root, so

xn+1=(rnxn)rn(1xn)rn1.x_{n+1} = \frac{(r_n - x_n) - \sqrt{r_n}(1 - x_n)}{r_n - 1}.

From this, we can solve for the radius of the new circle,

rn+1=(xn+1xn)24rn.r_{n+1} = \frac{(x_{n+1} - x_n)^2}{4 r_n}.

Let’s check the formula using the yellow circle to find the blue circle. Since x2=0x_2 = 0 and r2=14r_2 = \frac{1}{4} we get

x3=(140)14(10)141=141234=(2414)43=13.\begin{aligned} x_3 &= \frac{ (\frac{1}{4} - 0) - \sqrt{\frac{1}{4} } (1 - 0)} {\frac{1}{4} - 1} \\ &= \frac{\frac{1}{4} - \frac{1}{2} }{-\frac{3}{4}} = \left( \frac{2}{4} - \frac{1}{4} \right) \frac{4}{3} = \frac{1}{3}. \end{aligned}

The next circle is the green one with center at (x4,r4)(x_4, r_4), and from r3=33r_3 = \frac{\sqrt{3}}{3} we get

x4=(3313)33(113)331=12.x_4 = \frac{ (\frac{\sqrt{3}}{3} - \frac{1}{3}) - \sqrt{\frac{\sqrt{3}}{3}} (1 - \frac{1}{3})}{\frac{\sqrt{3}}{3} - 1} = \frac{1}{2}.

The values for the xx-axis positions (xnx_n) and radii (rnr_n) for each successive circle are determined by the formulas found in the last section, but simplifying the solutions can be tedious. Instead of calculating them by hand, let’s use Mathematica to find the answers. By putting the formulas in a loop, we can quickly generate a table of positions and radii for each circle.

n\mathbf{n}xn\mathbf{x_n}rn\mathbf{r_n}
220014\frac{1}{4}
3313\frac{1}{3}19\frac{1}{9}
4412\frac{1}{2}116\frac{1}{16}
5535\frac{3}{5}125\frac{1}{25}
6623\frac{2}{3}136\frac{1}{36}
7757\frac{5}{7}149\frac{1}{49}

Table: Circle positions and radii

Proof by Induction

The pattern for xnx_n seems to be 02,13,24,35\frac{0}{2}, \frac{1}{3}, \frac{2}{4}, \frac{3}{5} \ldots, and rn=122,132,142,r_n = \frac{1}{2^2}, \frac{1}{3^2}, \frac{1}{4^2}, \ldots so we might hypothesize that xn=n2nx_n = \frac{n-2}{n} and rn=1n2r_n = \frac{1}{n^2}. To prove that this formula holds in general, we can use Proof by Induction. First, you show that the formula holds for an initial case, and then you show that if it holds for the nthn^{th} case, then it also holds for the n+1stn+1^{st} case.

To do this, we need to substitute the values for xnx_n and rnr_n into

xn+1=(rnxn)rn(1xn)rn1rn+1=(xn+1xn)24rn\begin{aligned} x_{n+1} &= \frac{(r_n - x_n) - \sqrt{r_n}(1 - x_n)}{r_n - 1} \\ r_{n+1} &= \frac{(x_{n+1} - x_n)^2}{4 r_n} \end{aligned}

and show that the formula is still valid. Let’s check this for the case n=2n=2 where x2=0x_2 = 0 and r2=14.r_2 = \frac{1}{4}. The formula says

x3=(r2x2)r2(1x2)r21=(140)14(10)141=141234=1443=13.\begin{aligned} x_{3} &= \frac{(r_2 - x_2) - \sqrt{r_2}(1 - x_2)}{r_2 - 1} \\ &= \frac{(\frac{1}{4} - 0) - \sqrt{\frac{1}{4}}(1 - 0)}{\frac{1}{4} - 1} \\ &= \frac{\frac{1}{4} - \frac{1}{2}}{-\frac{3}{4}} \\ &= -\frac{1}{4} \cdot -\frac{4}{3} = \frac{1}{3}. \\ \end{aligned}

Next, we can check the formula for r3r_3,

rn+1=(xn+1xn)24rn=(130)2414=19.\begin{aligned} r_{n+1} &= \frac{(x_{n+1} - x_n)^2}{4 r_n} \\ &= \frac{(\frac{1}{3} - 0)^2}{4 \frac{1}{4}} = \frac{1}{9}.\\ \end{aligned}

The next step is to check the general case xn+1x_{n+1},

xn+1=(rnxn)rn(1xn)rn1=(1n2n2n)1n2(1n2n)1n21=1n(n2)n21n(n(n2)n)1n2n2=(1n2+2nn2n(n2)n2)n21n2=1n2+2n1n221n2=n2+2n11n2=n22n+11n2=(n1)2(n1)(n+1)=n1n+1=(n+1)2n+1\begin{aligned} x_{n+1} &= \frac{(r_n - x_n) - \sqrt{r_n}(1 - x_n)}{r_n - 1} \\ &= \frac{ \left( \frac{1}{n^2} - \frac{n-2}{n} \right) - \sqrt{\frac{1}{n^2}}(1 - \frac{n-2}{n})}{\frac{1}{n^2} - 1} \\ &= \frac{ \frac{1 - n(n-2)}{n^2} - \frac{1}{n} \left( \frac{n - (n-2)}{n} \right) }{\frac{1 - n^2}{n^2}} \\ &= \left( \frac{1 - n^2 + 2n}{n^2} - \frac{n - (n-2)}{n^2} \right) \frac{n^2}{1 - n^2} \\ &= \frac{1 - n^2 + 2n}{1 - n^2} - \frac{2}{1 - n^2} \\ &= \frac{-n^2 + 2n - 1}{1 - n^2} \\ &= -\frac{n^2 - 2n + 1}{1 - n^2} \\ &= \frac{(n-1)^2}{(n - 1)(n + 1)} = \frac{n - 1}{n + 1} = \frac{(n+1) - 2}{n+1} \\ \end{aligned}

and

rn+1=(xn+1xn)24rn=(n1n+1n2n)241n2=(n1n+1n2n)2n24=(n(n1)n(n+1)(n+1)(n2)n(n+1))2n24=(n2nn(n+1)n2n2n(n+1))2n24=(2n(n+1))2n24=4n2(n+1)2n24=1(n+1)2.\begin{aligned} r_{n+1} &= \frac{(x_{n+1} - x_n)^2}{4 r_n} \\ &= \frac{(\frac{n-1}{n+1} - \frac{n-2}{n})^2}{4 \frac{1}{n^2}} \\ &= \left( \frac{n-1}{n+1} - \frac{n-2}{n} \right)^2 \cdot \frac{n^2}{4} \\ &= \left( \frac{n(n-1)}{n(n+1)} - \frac{(n+1)(n-2)}{n(n+1)} \right)^2 \cdot \frac{n^2}{4} \\ &= \left( \frac{n^2 - n}{n(n+1)} - \frac{n^2 - n - 2}{n(n+1)} \right)^2 \cdot \frac{n^2}{4} \\ &= \left( \frac{2}{n(n+1)} \right)^2 \cdot \frac{n^2}{4} \\ &= \frac{4}{n^2(n+1)^2} \cdot \frac{n^2}{4} = \frac{1}{(n+1)^2}. \\ \end{aligned}

And that’s it - proof by induction.

From circles to the zeta function

Interestingly, the sum of their areas leads directly to a famous mathematical object, the zeta function. The area of a circle with radius rr is A=πr2,A = \pi r^2, so to find the areas of all of the small circles, we need to calculate

A=n=2πrn2=πn=2(1n2)2=πn=21n4.\begin{aligned} A &= \sum_{n=2}^{\infty} \pi r_n^2 \\ &= \pi \sum_{n=2}^{\infty} \left( \frac{1}{n^2} \right)^2 \\ &= \pi \sum_{n=2}^{\infty} \frac{1}{n^4}. \\ \end{aligned}

This is very nearly the zeta function,

ζ(s)=n=11ns,s>1.\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}, \enspace s > 1.

The only difference is that nn starts at 22 for the circle problem, while the definition of the zeta function sums over all of the natural numbers, so we need to subtract one from the zeta function or include the two semicircles with radii r1r_1 to make them the same.

The closed form of the zeta function was first solved by Leonhard Euler in 1734 for s=2s=2, and is called the Basel problem, after the city where Euler lived at the time. Euler found that ζ(2)=π26\zeta(2) = \frac{\pi^2}{6}. For the circles problem, ζ(4)=π490\zeta(4) = \frac{\pi^4}{90}, so the sum of the areas of all of the circles is

A=n=1πrn2=πζ(4)=π(π490)3.4\begin{aligned} A &= \sum_{n=1}^\infty \pi r_n^2 \\ &= \pi \zeta(4) \\ &= \pi \left(\frac{\pi^4}{90} \right) \approx 3.4 \end{aligned}

including the large semicircles with radius 11.

The Riemann Hypothesis

Bernhard Riemann was a German mathematician

Figure 5.

Georg Friedrich Bernhard Riemann.

who contributed significant new ideas to the areas of analysis, differential geometry, and number theory. He extended the zeta function through an analytic continuation A method for extending a function beyond its original domain while preserving its analytic properties. with the functional equation An equation that links a function’s values at different points (e.g., ζ(s)ζ(s) and ζ(1s)ζ(1-s)).,

ζ(s)=2sπs1sin(πs2)Γ(1s)ζ(1s).\zeta(s) = 2^s \pi^{s-1} \sin \left( \frac{\pi s}{2} \right) \Gamma(1-s)\zeta(1-s).

The zeta function diverges when s=1s = 1 since it reduces to the harmonic series,

ζ(1)=11+12+13+.\zeta(1) = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \cdots \rightarrow \infty.

Riemann was interested in how the function behaved everywhere in the complex plane, that is, for all values of s=σ+its = \sigma + i t where i=1.i = \sqrt{-1}. For all values of σ1\sigma \leq 1, the zeta function diverges, so he extended it beyond the region where ζ(s)\zeta(s) converges to other regions with a continuation. If two analytic functions agree on a connected region, their analytic continuation defines the same function everywhere that the function is valid.

Riemann began by expressing the series as an integral, using the Gamma function A continuation of factorials, Γ\Gamma is defined for all complex numbers except non-positive integers, and Γ(n)=(n1)!Γ(n) = (n-1)! for positive integers.:

1ns=1Γ(s)0ts1entdt\frac{1}{n^s} = \frac{1}{\Gamma(s)} \int_0^\infty t^{s-1} e^{-nt} dt

and substituted this into the zeta function to get

ζ(s)=1Γ(s)0ts1et1dt\zeta(s) = \frac{1}{\Gamma(s)} \int_0^\infty \frac{t^{s-1}}{e^{t} -1} dt

which converges everywhere except at s=1.s=1. He then derived the functional equation above that reflects the zeta function around the line Re(s)=12Re(s) = \frac{1}{2} so that the new function is defined everywhere in the complex plane except at s=1+0i.s = 1 + 0i. But, while the functional equation relates ζ(s)\zeta(s) to ζ(1s)\zeta(1-s), it is not symmetric about the line s=12s = \frac{1}{2} in the complex plane. Riemann introduced the reflection formula for the Gamma function,

Γ(s)Γ(1s)=πsin(πs)\Gamma(s) \Gamma(1-s) = \frac{\pi}{\sin(\pi s)}

and substituted this into the functional equation to get the “completed” zeta function

ζ(s)=12s(s1)πs/2Γ(s2)ζ(1s)\zeta(s) = \frac{1}{2} s(s-1)\pi^{-s/2}\Gamma \left( \frac{s}{2} \right) \zeta(1-s)

which is symmetric since ζ(s)=ζ(1s).\zeta(s) = \zeta(1-s).

Figure 6.

The analytic continuation of the ζ\zeta function.

The line of symmetry where s=12s = \frac{1}{2} is very special because the analytic extension of ζ(s)\zeta(s) has zeros along this line, that is, ζ(12+it)=0\zeta(\frac{1}{2} + i t) = 0 for some values of tt. In fact, three trillion zeros of the function have been found along this line, and none anywhere else except for the trivial cases of 2k-2k for k=1,2,3,k = 1,2,3, \ldots where sin(πs2)=0\sin \left( \frac{\pi s}{2} \right) = 0. What’s so important about this line? Well, the curious property of these zeros is that they can tell you where to find prime numbers.

A function called the prime pi function counts the number of primes less than some number. For example (using Pari/GP) primepi(10) = 4 because there are four primes less than 1010, namely 2,3,5,2,3,5, and 7.7. The number of primes less than 10001000 is primepi(1000) = 168. If you graph of this function you will see a step plot like this:

Figure 7.

Prime counting function

Now, if you calculate the Riemann harmonic for any point a+bia + bi in the complex plane,

T(x)=Re(n=1μ(n)n+bilog(x)/n(a+bi)log(x)/nezzdz)T(x) = Re \left( \sum_{n=1}^\infty \frac{\mu(n)}{n} \int_{-\infty+bi \log(x)/n}^{(a+bi) \log(x)/n} \frac{e^z}{z} dz \right)

and plot this for values of x,x, you get a curve like this:

Figure 8.

Riemann harmonic.

The function μ(n)\mu(n) is the Möbius function, which is equal to 11 if n=1n=1, 00 if nn has squared prime factors, e.g., 1212, and is equal to (1)k(-1)^k if nn is the product of kk distinct prime factors.

When you plot the Riemann harmonic (or Riemann Converter) at s=1s=1 it generates a smooth curve:

Figure 9.

Riemann converter at s=1s=1.

Next, subtract the Riemann harmonic for each of the non-trivial zeros of ζ(s)\zeta(s) from the curve at s=1,s=1, and we get this stair function:

Figure 10.

Riemann prime countinng formula.

which is exactly the prime π\pi counting formula! In other words, the Riemann zeta function tells us where to find primes even though they seem to be randomly distributed on the number line. Even though three trillion zeros of the zeta function have been found, nobody has a proof that they all lie on the line s=12s = \frac{1}{2} and nobody has found a counterexample. If you can do either, then the Clay Mathematics Institute would like to have a word with you and present you with a million dollars for solving one of the seven Millennium Prize Problems.

Planck, Stefan-Boltzmann, and Zeta

The solution to the circles problem required the particular value of s=4s = 4, which coincidentally is also used in the derivation of Planck’s law of blackbody radiation. Blackbody radiation is the electromagnetic radiation emitted by an ideal, perfect absorber of all incident radiation, where the spectrum depends only on its temperature. This explains why objects glow at different colors as they heat up, like a heated piece of metal turning from red to white, and was central to the development of quantum theory because classical physics could not accurately describe it.

Before Planck, classical physics failed to explain the full black body spectrum, a problem known as the “ultraviolet catastrophe”. The classical Rayleigh-Jeans law correctly predicted the spectrum at long wavelengths but suggested that the radiation intensity would increase infinitely at higher frequencies, which did not match experimental observations.

The energy per unit volume per unit frequency of blackbody radiation at temperature TT is

u(ν,T)=8πhν3c31ehν/kT1u(ν,T) = \frac{8 \pi h \nu^3}{c^3} \frac{1}{e^{h\nu/kT}-1}

where

To find the total energy density u(T)u(T), we need to integrate over all frequencies,

u(T)=0u(ν,T)dν=8πhc30ν3ehν/kT1dνu(T) = \int_0^\infty u(\nu,T) d\nu = \frac{8 \pi h}{c^3} \int_0^\infty \frac{\nu^3}{e^{h\nu/kT}-1} d\nu

which may be simplified with a change of variables by letting

x=hνkT and dν=kThdxx = \frac{h \nu}{kT} \text{ and } d\nu = \frac{kT}{h}dx

so that

u(T)=8π(kT)4c3h30x3ex1dxu(T) = \frac{8 \pi (kT)^4}{c^3 h^3} \int_0^\infty \frac{x^3}{e^x-1} dx

and from the Riemann zeta function,

0xn1ex1dx=Γ(n)ζ(n)\int_0^\infty \frac{x^{n-1}}{e^x-1} dx = \Gamma(n) \zeta(n)

so, for the Planck equation, we need n=4n=4. Evaluating, Γ(4)=6\Gamma(4) = 6 and ζ(4)=π490,\zeta(4) = \frac{\pi^4}{90}, so

u(T)=8π(kT)4c3h3π415=aT4.u(T) = \frac{8 \pi (kT)^4}{c^3 h^3} \cdot \frac{\pi^4}{15} = aT^4.

where a=4σca = \frac{4 \sigma}{c} and σ\sigma is the Stefan-Boltzmann constant,

σ=2π5k415c2h35.67×108.\sigma = \frac{2 \pi^5 k^4}{15 c^2 h^3} \approx 5.67 \times 10^{-8}.

The difference is in geometry - aa relates temperature to the radiation energy density (Jm3K4) \left( \frac{J}{m^3 K^4} \right) while σ\sigma relates temperature to the radiative power per unit area (Wm2K4)\left( \frac{W}{m^2 K^4} \right) giving the Stefan-Boltzmann law

j=σT4j^* = \sigma T^4

that we used in Economics and the Stefan-Boltzmann Law and Stefan-Boltzmann Revisited.

Pell’s Equation

In Haven’s Haven, we introduced Pell’s equation

x2ny2=1x^2 - ny^2 = 1

for a non-square positive integer nn, and developed an algorithm (The Chakravala) to find xx and yy satisfying the equation for a given nn. There are infinitely many solutions, and finding one solution reveals the others, but it can be difficult to find even the smallest. For example, when n=61n= 61, the smallest values for xx and yy are x=1,766,319,049x = 1,766,319,049 and y=226,153,980.y = 226,153,980.

By extending the number system to include a quadratic field Q(n)Q(\sqrt{n}) A quadratic field extends rational numbers by adding n\sqrt{n}, creating a new number system where expressions like x+ynx + y \sqrt{n} become valid numbers with their own arithmetic rules., you get a modified version of the zeta function that’s specific to that extension. This modified zeta function gives how many numbers factor in the extended system and provides the fundamental unit, which is the smallest solution to the Pell equation.

The fundamental unit is the smallest unit greater than 1 in the ring of integers The ring of integers consists of all numbers in a field that satisfy polynomial equations with integer coefficients—think of it as the ‘whole numbers’ of an extended number system. of a real quadratic field. In real quadratic fields, units come from solutions to Pell’s equation since when x2ny2=1x^2 - n y^2 = 1, then ϵ=x+yn\epsilon = x + y \sqrt{n} is a unit or the multiplicative inverse of xynx - y \sqrt{n}. That is,

ϵ(xyn)=1.\epsilon (x - y \sqrt{n}) = 1.

Pell’s equation gives integer solutions, while the zeta function is a continuous, analytic function (except at s=1s = 1), but it provides discrete solutions just as it generates the prime counting function from the infinite sum of the continuous Riemann harmonics.

Zeta and Quantum Physics

In Extending Time, we showed how a consequence of Cesàro summation could lead to the result

1+2+3+=1121 + 2 + 3 + \ldots = - \frac{1}{12}

or the sum of all natural numbers from 1 to \infty is somehow 112.-\frac{1}{12}. Mathematica can calculate the values of ζ(s)\zeta(s) for any ss using the built-in Zeta function, and Zeta[-1] returns 112,-\frac{1}{12}, which is equivalent to

ζ(1)=111+121+131+=1+2+3+\zeta(-1) = \frac{1}{1^{-1}} + \frac{1}{2^{-1}} + \frac{1}{3^{-1}} + \cdots = 1 + 2 + 3 + \cdots

so the sum works in the analytic continuation. Cesàro summation is used in string theory.

The command ComplexPlot3D[Zeta[z], {z, -2 - 2 I, 2 + 2 I}, PlotLegends -> Automatic] plots the zeta function over [2,2]×[2i,2i],[-2,2] \times [-2i,2i],

Figure 11.

Plot of ζ(s)\zeta(s) over [2,2]×[2i,2i][-2,2] \times [-2i,2i].

See the JupyterLab Desktop for help setting up the Wolfram Language (Mathematica) in JupyterLab.

Zipf and Zeta

Zipf’s Law Zipf’s Law appears surprisingly often in nature and society, from word frequencies to city populations. It suggests an underlying simplicity in seemingly random distributions. (named for George Kingsley Zipf) says that frequency of occurrence is inversely proportional to rank. For example, the English word “the” occurs most often, appearing in about 7%7\% of written text, while the second most used word is “of”, which is found in 3.5%3.5 \% of the text. This empirically derived law may be expressed as

word frequency1word rank.\text{word frequency} \propto \frac{1}{\text{word rank}}.

Zipf’s Law applies to more than just word counts, as it has been found to describe the populations of cities, wealth inequality, and earthquakes.

Figure 12.

Zipf’s Law applied to earthquakes, word counts and city sizes.

Zipf’s Law says that the kthk^{th} item on a list should have a frequency proportional to its rank raised to a power s>1s > 1,

f(k)=1ksf(k) = \frac{1}{k^s}

and we can turn f(k)f(k) into a probability distribution by normalizing by the zeta function,

P(k)=1ζ(s)1ksP(k) = \frac{1}{\zeta(s)} \cdot \frac{1}{k^s}

so that the sum over all probabilities is one, k=1nP(k)=1.\sum_{k=1}^n P(k) = 1. Even though Zipf’s Law is empirically derived, it is directly related to the zeta function and is found in a wide range of applications.

Summary

What began as a problem in geometry led to an exploration of prime numbers and the Riemann Hypothesis, connections to physics through Planck’s Law and the Stefan-Boltzmann Law of radiation, a look back at Cesàro sums and string theory, as well as an alternate perspective on Pell’s equation in number theory. Zipf’s Law, which finds wide application in linguistics, urban studies, and seismology, is directly related to the zeta function, which converts empirical observations into a probability distribution.

The zeta function appears in so many contexts because it captures something fundamental about how quantities scale and distribute—whether we’re counting primes, measuring radiation, or analyzing word frequencies. The mathematics of the zeta function weaves through number theory and physics, revealing deep connections between seemingly disparate phenomena.

Explore Further: Hands-On Experiments

The best way to develop intuition about the zeta function is to experiment with it yourself. Here are some concrete projects you can tackle with freely available tools:

  1. Explore Circle Packing in GeoGebra
    • Download GeoGebra and recreate the nested circles problem.
    • Use the formulas we derived to construct circles automatically.
    • What happens if the two large circles have different radii? Can you derive a general formula?
    • Try packing circles in other configurations—between three circles, or in a corner.
  2. Investigate the Zeta Function with PARI/GP
    • Compute zeta values: zeta(2), zeta(4), zeta(6) and verify they match the analytical formulas.
    • Create a special function Z = lfuncreate(1) and then find the zeros less than 100, lfunzeros(Z,100). How would you verify that these are correct?
    • (Tricky) Experiment with Pell’s equation: Use bnfinit(x^2-61) to explore the quadratic field Q(61)Q(\sqrt{61}) and find the fundamental unit.
  3. Visualize with Mathematica/Wolfram Language
    • Access through Wolfram Cloud (free tier available) or JupyterLab as described in our earlier article.
    • Plot the zeta function: Plot[Zeta[s], {s, -5, 5}].
    • Verify the circle formula: Create a table comparing our analytical formula rn=1n2r_n = \frac{1}{n^2} with numerical calculations.
    • Test Zipf’s Law: Import a text file and count word frequencies, then plot log(rank) vs log(frequency) to see if it follows a power law.
  4. Prime Counting Experiments
    • Use PARI/GP’s primepi(x) function to count primes up to various limits.
    • Compare with the logarithmic integral approximation: Li(x) = real(eint1(-log(x))).
    • For x = 100, 1000, 10000, compute the error: primepi(x) - Li(x). Notice how the error oscillates—these oscillations are connected to the zeta zeros!
  5. Zipf’s Law Investigation
    • Download any public domain text from Project Gutenberg.
    • Write a simple word counter (or use existing tools) to get word frequencies.
    • In Mathematica: Import the text, use WordCounts[], then plot rank vs frequency on log-log axes.
    • Fit the data to a power law and extract the exponent ss.
    • Try different types of texts (novels, technical works, poetry)—does the exponent change?
  6. Physics Connection
    • Use the zeta function to verify the Stefan-Boltzmann constant.
    • In Mathematica: σ = (2 π^5 k^4)/(15 c^2 h^3) where k, c, h are the physical constants.
    • Compute the blackbody spectrum at different temperatures. How does Wien’s Law relate?
    • Plot u(ν,T) for T = 3000K, 5000K, 7000K to see why objects change color as they heat.
  7. Advanced Challenge: Riemann-Siegel Formula
    • Implement a basic version of the Riemann-Siegel formula for computing ζ(1/2 + it).
    • Use it to numerically search for zeros near the critical line
    • Compare the results to the PARI/GP solution.

Code for this article

The Mathematica code Riemann_zeta.ipynb is contained in a JupyterLab Notebook, available on Github.

Software

References

[1] 3Blue1Brown - Visualizing the Riemann zeta function and analytic continuation. Accessed: Oct. 09, 2025.
[2] Michael Penn, A twist on a classic circle problem, (Nov. 24, 2024). Accessed: Oct. 08, 2025. [Online Video]. Available: https://www.youtube.com/watch?v=ZBTPG6dp_0U
[3] A. Bagdasaryan, An elementary and real approach to values of the Riemann zeta function, arXiv.org. Accessed: Oct. 12, 2025.
[4] G. H. Hardy, An Introduction To The Theory Of Numbers. Oxford New York Auckland: Oxford University Press, U.S.A., 2008.
[5] Basel problem, Wikipedia. Sept. 18, 2025. Accessed: Oct. 07, 2025.
[6] C. Shaw-Carmody, Computational Number Theory in Sage,
[7] J. M. Borwein, D. M. Bradley, and R. E. Crandall, Computational strategies for the Riemann zeta function, Journal of Computational and Applied Mathematics, vol. 121, no. 1, pp. 247–296, Sept. 2000, doi: 10.1016/S0377-0427(00)00336-8.
[8] Does the ‘Rich-Get-Richer’ Power-Law Truly Model Wealth Distribution? Accessed: Oct. 12, 2025.
[9] G. De Marzo, A. Gabrielli, A. Zaccaria, and L. Pietronero, Dynamical approach to Zipf’s law, Phys. Rev. Res., vol. 3, no. 1, p. 013084, Jan. 2021, doi: 10.1103/PhysRevResearch.3.013084.
[10] H. Montgomery, A. Nikeghbali, and M. T. Rassias, Eds., Exploring the Riemann Zeta Function: 190 years from Riemann’s Birth. Cham: Springer, 2017.
[11] L. Chiou, Fractal Chaos Discovered in Prime Numbers, Scientific American. Accessed: Oct. 07, 2025.
[12] J. Havil and F. Dyson, Gamma: Exploring Euler’s Constant. Princeton, N.J: Princeton University Press, 2009.
[13] A. Kontorovich, How I Learned to Love and Fear the Riemann Hypothesis, Quanta Magazine. Accessed: Oct. 08, 2025.
[14] D. J. Hutama, Implementation of Riemann’s Explicit Formula for Rational and Gaussian Primes in Sage.
[15] T. M. Apostol, Introduction to Analytic Number Theory. New York: Springer, 1976.
[16] Millennium Prize Problems, Wikipedia. Sept. 27, 2025. Accessed: Oct. 09, 2025.
[17] E. W. Weisstein, Möbius Function. Accessed: Oct. 10, 2025.
[18] Networks, Crowds, and Markets: A Book by David Easley and Jon Kleinberg. Accessed: Oct. 13, 2025.
[19] M. J. Mossinghoff and T. S. Trudgian, Nonnegative trigonometric polynomials and a zero-free region for the Riemann zeta-function, Journal of Number Theory, vol. 157, pp. 329–349, Dec. 2015, doi: 10.1016/j.jnt.2015.05.010.
[20] W. Dittrich, On Riemann’s Paper, ‘On the Number of Primes Less Than a Given Magnitude,’ Aug. 02, 2017, arXiv: arXiv:1609.02301. doi: 10.48550/arXiv.1609.02301.
[21] J. Derbyshire, Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics. New York: Plume, 2004.
[22] Prime-counting function, Wikipedia. Oct. 04, 2025. Accessed: Oct. 09, 2025.
[23] D. Hutama, Riemann explicit formula for primes. (July 04, 2025). Python. Accessed: Oct. 09, 2025.
[24] H. M. Edwards, Riemann’s Zeta Function. Mineola, NY: Dover Publications, 2001.
[25] D. N. Rockmore, Stalking the Riemann hypothesis: the quest to find the hidden law of prime numbers, 1. ed. New York, NY: Pantheon Books, 2005.
[26] A. E. Ingham, The Distribution of Prime Numbers. Cambridge ; New York: Cambridge University Press, 1990.
[27] The Euler-Maclaurin formula, Bernoulli numbers, the zeta function, and real-variable analytic continuation, What’s new. Accessed: Oct. 09, 2025.
[28] The Millennium Prize Problems, Clay Mathematics Institute. Accessed: Oct. 10, 2025.
[29] M. du Sautoy, The Music of the Primes: Searching to Solve the Greatest Mystery in Mathematics. New York: Harper Perennial, 2004.
[30] D. Platt and T. Trudgian, The Riemann hypothesis is true up to 310123\cdot 10^{12}, Bulletin of London Math Soc, vol. 53, no. 3, pp. 792–797, June 2021, doi: 10.1112/blms.12460.
[31] J. Sondow, The Riemann Hypothesis, simple zeros and the asymptotic convergence degree of improper Riemann sums, Proc. Amer. Math. Soc., vol. 126, no. 5, pp. 1311–1314, 1998, doi: 10.1090/S0002-9939-98-04607-3.
[32] P. Borwein, S. Choi, B. Rooney, and A. Weirathmueller, Eds., The Riemann Hypothesis: A Resource for the Afficionado and Virtuoso Alike. New York ; London: Springer, 2008.
[33] The Riemann Zeros and Eigenvalue Asymptotics | SIAM Review. Accessed: Oct. 12, 2025.
[34] G. Lowther, The Riemann Zeta Function and the Functional Equation, Almost Sure. Accessed: Oct. 12, 2025.
[35] A. Ivic, The Riemann Zeta-Function: Theory and Applications. Mineola, N.Y: Dover Publications, 2003.
[36] A. R. Booker, Turing and the Riemann Hypothesis.
[37] T. Needham and R. Penrose, Visual Complex Analysis: 25th Anniversary Edition. Oxford, United Kingdom ; New York, NY: Oxford University Press, 2023.
[38] HexagonVideos, What is the Riemann Hypothesis REALLY about?, (Dec. 12, 2022). Accessed: Oct. 09, 2025. [Online Video]. Available: https://www.youtube.com/watch?v=e4kOh7qlsM4
[39] Zeta Functions: Dedekind Versus Hasse-Weil. Accessed: Oct. 12, 2025.
[40] Zipf’s law, Wikipedia. Oct. 06, 2025. Accessed: Oct. 12, 2025.
[41] Zipf’s Law for Cities – A Simple Explanation for Urban Populations : Networks Course blog for INFO 2040/CS 2850/Econ 2040/SOC 2090. Accessed: Oct. 12, 2025.
[42] S. T. Piantadosi, Zipf’s word frequency law in natural language: A critical review and future directions, Psychon Bull Rev, vol. 21, no. 5, pp. 1112–1130, Oct. 2014, doi: 10.3758/s13423-014-0585-6.

Image credits