In 30 seconds
3Blue1Brown connects the natural logarithm to prime density, exponential rates of change, the harmonic series and an alternating series, with attention to the convergence of the endpoint.
- 1Prime densityNear large x, 1/ln x is an approximate density, not a short-interval guarantee.
- 2Divergence by groupingSuccessive groups each contribute at least one half.
- 3A natural growth rateThe derivative of e^(rt) is r times the function.
- 4Euler–Mascheroni constantHₙ − ln n approaches γ, approximately 0.577.
- 5Treat the endpoint separatelyThe alternating series converges at x = 1 even though the derivative’s geometric series does not.
Takeaways
- The prime density estimate near large x involves 1/ln x.
- The harmonic series diverges slowly, with Hₙ approximately ln n + γ.
- The base e makes exponential rates of change particularly simple.
- The alternating harmonic series equals ln 2; its endpoint requires care.
Read the edited text by chapter
Primes and logarithms
Estimate density near a trillion and introduce surprising identities.
How many primes should we expect near a trillion? A small program finds 37 in the next thousand integers. A useful estimate for the density near a large number x is 1/ln x, suggesting roughly one prime in 27.6 near 10¹².
That density is an asymptotic guide, not a guarantee for every short interval. Still, it raises a beautiful question: why does the natural logarithm appear in a problem about whole numbers?
Consider another connection. The sum of reciprocal squares is 1 + 1/4 + 1/9 + … = π²/6. If we retain terms indexed by prime powers pᵏ and weight each by 1/k, the resulting sum is ln(π²/6). The video presents this prime-pattern identity as a surprise, rather than deriving it here.
Harmonic series
Grouping proves divergence and reveals slow growth.
A more approachable series alternates signs: 1 − 1/2 + 1/3 − 1/4 + … converges to ln 2, approximately 0.693. By contrast, adding all the positive reciprocals gives the harmonic series, which grows without bound.
Why does the harmonic series diverge even though its terms shrink? Group 1/3 and 1/4, then 1/5 through 1/8, then 1/9 through 1/16, and so on. Each group sums to at least 1/2, so infinitely many groups eventually exceed any fixed bound.

The groups double in size, hinting that growth is very slow. In fact, the nth harmonic sum Hₙ is approximately ln n + γ, where γ is the Euler–Mascheroni constant, about 0.577.
To make the harmonic sum reach one million, n must be roughly e^(1,000,000 − γ). Its base-ten exponent is about 434,294: an enormous number of terms. The estimate illustrates logarithmic growth rather than giving an easily computable exact threshold.
Why choose e?
Equivalent exponential families have especially readable rates with base e.

Now consider families of exponential functions. Every positive-base exponential aˣ can be written as e^(x ln a). Changing a and changing the coefficient of x in the exponent describe the same family.
The same is true for bell-shaped expressions: a suitable change of parameters can express the same curve using another positive base. For a normal distribution with standard deviation σ, the exponent is −(x − μ)²/(2σ²); the video description corrects a missing factor of 2.
Complex exponentials also fit this pattern. e^(it) traces the unit circle at one radian per unit of t, while 2^(it) = e^(it ln 2) traces it at a different rate. Rotation is not exclusive to the base e.
What makes e especially convenient is its rate of change: the derivative of eˣ is eˣ itself. Thus the derivative of e^(rt) is r e^(rt), and r directly expresses the instantaneous growth rate relative to the current value.
Derivatives and the exponential series
Derive the base-dependent slope and explain exp as a power series.
For another positive base, d(aˣ)/dx = (ln a)aˣ. We can see why a proportionality constant appears by factoring aˣ out of the difference quotient; the remaining limit depends on the base.
For a = 2, that limit is ln 2, roughly 0.693. One can define e as the base for which the proportionality constant is exactly one, or start from an equivalent definition of the exponential function.
One such starting point is the infinite power series exp(x) = 1 + x + x²/2! + x³/3! + …. Its addition property makes it an exponential function, and e can be defined as exp(1).
Differentiating the power series term by term shifts its terms: the derivative of xⁿ/n! is xⁿ⁻¹/(n−1)!. The resulting series is the original series, explaining why exp(x) is its own derivative.
Natural log and area
The derivative 1/x connects logarithms to harmonic sums.
Since y = ln x means eʸ = x, implicit differentiation gives eʸ dy/dx = 1. Substituting eʸ = x yields d(ln x)/dx = 1/x for x > 0.
This derivative connects the harmonic sum to area. The integral of 1/x from 1 to n is ln n. Rectangles with widths one and heights 1, 1/2, 1/3 and so on approximate the area under the curve.

The difference between Hₙ and ln n approaches γ as n grows. The rectangles picture therefore gives more than a loose analogy: it helps explain both the logarithmic growth and the finite correction.
The alternating harmonic sum
Generalize, differentiate within the convergence radius, and handle the endpoint.
To understand the alternating sum, generalize it to f(x) = x − x²/2 + x³/3 − …. For |x| < 1, termwise differentiation gives 1 − x + x² − … = 1/(1+x), so f(x) = ln(1+x).
The endpoint x = 1 needs a separate argument: the geometric derivative series does not converge there. The alternating harmonic series does converge, and taking the limit as x approaches 1 from below, or integrating a finite geometric sum and bounding its remainder, gives ln 2.

The lesson ends with a broader observation about problem solving. Familiarity with derivatives, series and geometric pictures can reveal connections that initially look like magic. Playing with those patterns builds the intuition needed to recognize them later.
More from this channel
40:44EN
51:55EN
0:55EN
33:51EN
2:25EN
1:02EN