Skip to content

Euler and Ramanujan: The Giant of Calculation and the Man of Intuition

Prerequisite:The Four Color Theorem: Why Maps Need Four Colors, and the First Proof Written by a Computer

Raw
  • Euler’s identity eiπ+1=0e^{i\pi} + 1 = 0 is not a beautiful slogan. Once the exponential function, the trigonometric functions and the complex numbers are rewritten in the language of power series, the identity comes out of necessity. In this article we derive it from the series.
  • In his twenties Euler solved the Basel problem 1+14+19+=π261 + \frac{1}{4} + \frac{1}{9} + \cdots = \frac{\pi^2}{6}, and from the very same manipulation he extracted 1/n4=π4/90\sum 1/n^4 = \pi^4/90 as well. We follow that computation to the end.
  • With the Königsberg bridges and the polyhedron formula VE+F=2V - E + F = 2, Euler created a mathematics that uses neither length nor angle: the doorway to topology and graph theory. We prove both results.
  • Ramanujan was self-taught and left behind an enormous number of formulas without proofs. One of them, 1π=229801k0(4k)!(1103+26390k)(k!)43964k\frac{1}{\pi} = \frac{2\sqrt{2}}{9801}\sum_{k \ge 0} \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}}, gives π\pi correctly to seven decimal places from its first term alone. We check this by direct computation.
  • The contrast between the two men is not “intuition versus logic”. Euler also leapt boldly, and Ramanujan was a demon of computation. The difference lies in what each counted as a proof. We take up that point at the end.

1. Motivation: there is a person behind every formula

Section titled “1. Motivation: there is a person behind every formula”

Formulas in textbooks usually appear in finished form. We are shown eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta, but not why anyone would think of such an expression, nor what its author was computing at the time. Seen through the results alone, mathematics looks like a collection of rules that fell out of the sky.

In reality, behind every formula there is a problem someone wanted to solve. Euler considered exponentials of complex numbers because he wanted oscillating functions to be easier to handle while solving differential equations. Ramanujan wrote down strange series for π\pi because he was mass-producing rapidly convergent series with a tool called modular equations. Knowing the motive turns a formula from an object of memorisation into the outcome of a concrete computation that somebody carried out.

In this article we take up two figures who stand in particularly sharp contrast in the history of mathematics. Leonhard Euler (1707–1783) left roughly 866 papers and books over his lifetime and created much of the notation still in use today. Srinivasa Ramanujan (1887–1920) started as a clerk in a port office in India and, by the time he died at thirty-two, had filled his notebooks with some 3900 formulas.

This article, however, is not a biography. Its purpose is to carry out to the end, here and now, the computations the two men actually performed.

2. Preliminaries: what does it mean to add infinitely many things?

Section titled “2. Preliminaries: what does it mean to add infinitely many things?”

Infinite series appear repeatedly below. Let us briefly recall what is taught at the secondary level.

Definition 2.1Sum of an infinite series

Given a sequence a1,a2,a3,a_1, a_2, a_3, \ldots, set the NN-th partial sum to be SN=a1+a2++aNS_N = a_1 + a_2 + \cdots + a_N. If SNS_N approaches some real (or complex) number SS as NN \to \infty, we write

n=1an=S\sum_{n=1}^{\infty} a_n = S

and say that the series converges to SS. If there is nothing it approaches, the series diverges.

So there is no such operation as “adding infinitely many things” in itself. The definition has two stages: form finite sums first, then pass to the limit. Blurring this point produces the same species of confusion as the one surrounding 1=0.9991 = 0.999\ldots (the value of an infinite decimal is defined in the same two stages(Definition 2.2)[Is 1 Equal to 0.999…? Fixing the Meaning of an Infinite Decimal First], and from this 0.999… = 1(Theorem 3.7)[Is 1 Equal to 0.999…? Fixing the Meaning of an Infinite Decimal First] follows; see Is 1 equal to 0.999…? for details).

Definition 2.2The complex exponential function

For a complex number zz we define

ez=n=0znn!=1+z+z22!+z33!+e^{z} = \sum_{n=0}^{\infty} \frac{z^n}{n!} = 1 + z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots

This series converges absolutely for every complex number zz.

Remark 2.3

ee raised to a complex power” cannot be defined in the naive sense of multiplying ee by itself some number of times. For e2e^{2} the reading “multiply ee twice” suffices, but eie^{i} cannot be read as “multiply ee together ii times”. So we resort to a manoeuvre: take as the definition the series expansion that held in the real case. This is the standard device for extending a definition; all that remains to be checked is that the new definition does not contradict the old one, that is, that it agrees with the familiar eze^z when zz is real.

Absolute convergence means that zn/n!\sum |z^n/n!| converges. This matters, because for an absolutely convergent series it is guaranteed that the sum is unchanged if the terms are rearranged, and that the product of two such series may be expanded term by term. Without that guarantee every computation below would lose its meaning.

3. Euler: the Basel problem, the work that made his name

Section titled “3. Euler: the Basel problem, the work that made his name”

In 1644 the Italian Pietro Mengoli posed the following problem.

1+14+19+116+=n=11n21 + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \cdots = \sum_{n=1}^{\infty} \frac{1}{n^2}

What is this sum? That it converges at all is immediate: for n2n \ge 2 we have 1n2<1n(n1)=1n11n\frac{1}{n^2} < \frac{1}{n(n-1)} = \frac{1}{n-1} - \frac{1}{n}, so the partial sums are bounded above by 1+(11N)<21 + (1 - \frac{1}{N}) < 2. But what the sum is remained unknown. Jakob Bernoulli and other leading mathematicians of the day attacked it and failed, and the question came to be called the Basel problem after the home city of the Bernoulli family.

Adding the terms numerically yields no clue either. Even summing up to N=1000N = 1000 gives only 1.64391.6439\ldots; convergence is slow, and no one could guess π2/6=1.6449\pi^2/6 = 1.6449\ldots from such a number.

In 1735 the twenty-eight-year-old Euler produced the answer. What he used was the following bold analogy.

Theorem 3.1The Basel problem

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}

holds.

Proof(Theorem 3.1)

What follows is Euler’s own argument. There is one gap in it, and we shall point out exactly where after the proof.

Divide both sides of the Taylor expansion

sinx=xx33!+x55!\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots

by xx to obtain

sinxx=1x26+x4120\frac{\sin x}{x} = 1 - \frac{x^2}{6} + \frac{x^4}{120} - \cdots

Regard the left-hand side as a “polynomial of infinite degree”. The zeros of this function are x=±π,±2π,±3π,x = \pm\pi, \pm 2\pi, \pm 3\pi, \ldots (the point x=0x = 0 is not a zero, since sinx/x1\sin x / x \to 1 there).

If a polynomial P(x)P(x) of finite degree satisfies P(0)=1P(0) = 1 and has zeros r1,,rmr_1, \ldots, r_m, then

P(x)=(1xr1)(1xrm).P(x) = \left(1 - \frac{x}{r_1}\right)\cdots\left(1 - \frac{x}{r_m}\right).

Euler extended this verbatim to infinite degree. Pairing the zeros ±nπ\pm n\pi two by two,

sinxx=n=1(1xnπ)(1+xnπ)=n=1(1x2n2π2).\frac{\sin x}{x} = \prod_{n=1}^{\infty}\left(1 - \frac{x}{n\pi}\right)\left(1 + \frac{x}{n\pi}\right) = \prod_{n=1}^{\infty}\left(1 - \frac{x^2}{n^2\pi^2}\right).

Now consider the coefficient of x2x^2 when this infinite product is expanded. It is the sum over all ways of choosing x2n2π2-\frac{x^2}{n^2\pi^2} from exactly one factor and 11 from all the rest, so the coefficient of x2x^2 is

n=11n2π2=1π2n=11n2.-\sum_{n=1}^{\infty}\frac{1}{n^2\pi^2} = -\frac{1}{\pi^2}\sum_{n=1}^{\infty}\frac{1}{n^2}.

On the Taylor side, the coefficient of x2x^2 was 16-\frac{1}{6}. Equating the two as one does for polynomials,

1π2n=11n2=16,-\frac{1}{\pi^2}\sum_{n=1}^{\infty}\frac{1}{n^2} = -\frac{1}{6},

that is, 1/n2=π2/6\sum 1/n^2 = \pi^2/6.

Remark 3.2

The gap lies in the assumption that functions with the same zeros must factor in the same way. In infinite degree this is false in general. We explain the point with a counterexample in the Appendix. Euler himself was aware of the danger: he compared π2/6=1.644934\pi^2/6 = 1.644934\ldots with high-precision partial sums, and derived the same value by another method before publishing. The lesson here is that the tool for guessing an answer and the tool for proving it may be different. Conversely, no amount of numerical agreement constitutes a proof (the formula that works forty times and fails on the forty-first(Example 4.2)[Why Mathematics Is Hard] is the standing warning). A rigorous justification had to wait for Weierstrass’s factorisation theorem in the nineteenth century.

More can be extracted from the very same identity. Let us look at the coefficient of x4x^4 in the expansion of the infinite product.

Example 3.3The sum of the reciprocals of fourth powers

The x4x^4 term arises when x2m2π2-\frac{x^2}{m^2\pi^2} and x2n2π2-\frac{x^2}{n^2\pi^2} are chosen from two distinct factors (mnm \ne n). The sign is (1)2=+1(-1)^2 = +1, so the coefficient of x4x^4 is

1π4m<n1m2n2.\frac{1}{\pi^4}\sum_{m < n}\frac{1}{m^2 n^2}.

Writing S2=1/n2S_2 = \sum 1/n^2 and S4=1/n4S_4 = \sum 1/n^4, we have

S22=(m1m2)(n1n2)=m=n1m2n2+2m<n1m2n2=S4+2m<n1m2n2,S_2^{\,2} = \left(\sum_m \frac{1}{m^2}\right)\left(\sum_n \frac{1}{n^2}\right) = \sum_{m = n}\frac{1}{m^2n^2} + 2\sum_{m<n}\frac{1}{m^2n^2} = S_4 + 2\sum_{m<n}\frac{1}{m^2n^2},

so that

m<n1m2n2=S22S42.\sum_{m<n}\frac{1}{m^2n^2} = \frac{S_2^{\,2} - S_4}{2}.

On the Taylor side the coefficient of x4x^4 is 1120\frac{1}{120}, whence

1π4S22S42=1120S22S4=π460.\frac{1}{\pi^4}\cdot\frac{S_2^{\,2} - S_4}{2} = \frac{1}{120} \quad\Longrightarrow\quad S_2^{\,2} - S_4 = \frac{\pi^4}{60}.

By Theorem 3.1 we have S2=π2/6S_2 = \pi^2/6, so S22=π4/36S_2^{\,2} = \pi^4/36. Therefore

S4=π436π460=π4(51803180)=2π4180=π490.S_4 = \frac{\pi^4}{36} - \frac{\pi^4}{60} = \pi^4\left(\frac{5}{180} - \frac{3}{180}\right) = \frac{2\pi^4}{180} = \frac{\pi^4}{90}.

Let us check numerically. Since π4=97.4091\pi^4 = 97.4091\ldots, we get π4/90=1.082323\pi^4/90 = 1.082323\ldots. Adding just four terms of the left-hand side,

1+116+181+1256=1+0.0625+0.012346+0.003906=1.078752,1 + \frac{1}{16} + \frac{1}{81} + \frac{1}{256} = 1 + 0.0625 + 0.012346 + 0.003906 = 1.078752,

which is indeed climbing towards 1.08231.0823. The formula checks out.

Continuing in the same fashion gives ζ(6)=π6/945\zeta(6) = \pi^6/945, ζ(8)=π8/9450\zeta(8) = \pi^8/9450, and so on: the even powers can be computed indefinitely. Euler went as far as ζ(26)\zeta(26). For odd powers, incidentally, no closed form is known to this day. Apéry proved ζ(3)\zeta(3) irrational only in 1978, and whether ζ(5)\zeta(5) is irrational is still open.

4. Euler’s identity: eiπ+1=0e^{i\pi} + 1 = 0

Section titled “4. Euler’s identity: eiπ+1=0e^{i\pi} + 1 = 0eiπ+1=0”

Theorem 4.1Euler's formula

For every real number θ\theta,

eiθ=cosθ+isinθ,e^{i\theta} = \cos\theta + i\sin\theta,

where eiθe^{i\theta} is understood as defined by the series in Definition 2.2.

Proof(Theorem 4.1)

Substitute z=iθz = i\theta into Definition 2.2:

eiθ=n=0(iθ)nn!=n=0inθnn!.e^{i\theta} = \sum_{n=0}^{\infty}\frac{(i\theta)^n}{n!} = \sum_{n=0}^{\infty}\frac{i^n\theta^n}{n!}.

The powers of ii cycle with period four: i0=1, i1=i, i2=1, i3=ii^0 = 1,\ i^1 = i,\ i^2 = -1,\ i^3 = -i. So we split nn into even n=2kn = 2k and odd n=2k+1n = 2k+1. Since i2k=(i2)k=(1)ki^{2k} = (i^2)^k = (-1)^k and i2k+1=(1)kii^{2k+1} = (-1)^k i,

eiθ=k=0(1)kθ2k(2k)!+ik=0(1)kθ2k+1(2k+1)!.e^{i\theta} = \sum_{k=0}^{\infty}\frac{(-1)^k\theta^{2k}}{(2k)!} + i\sum_{k=0}^{\infty}\frac{(-1)^k\theta^{2k+1}}{(2k+1)!}.

This rearrangement into even and odd terms is permitted because, as noted in Remark 2.3, the series converges absolutely.

Finally, the two series on the right are precisely the Taylor expansions

cosθ=1θ22!+θ44!,sinθ=θθ33!+θ55!\cos\theta = 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \cdots,\qquad \sin\theta = \theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \cdots

Hence eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta.

Corollary 4.2Euler's identity

eiπ+1=0.e^{i\pi} + 1 = 0.
Proof(Corollary 4.2)

Put θ=π\theta = \pi in Theorem 4.1. Since cosπ=1\cos\pi = -1 and sinπ=0\sin\pi = 0, we get eiπ=1+0i=1e^{i\pi} = -1 + 0\cdot i = -1. Adding 11 to both sides gives eiπ+1=0e^{i\pi} + 1 = 0.

This identity is called beautiful because five constants of entirely different origins — 00 (the additive identity), 11 (the multiplicative identity), π\pi (the circle), ee (growth) and ii (the imaginary unit) — are tied together in a single equation. Once the proof has been seen, however, one recognises it as necessity rather than mystery. The point eiθe^{i\theta} travels around the unit circle in the complex plane at constant speed, and at θ=π\theta = \pi it has gone halfway round and arrived at 1-1. That is all there is to it.

θcos θ + i sin θ−1(θ = π)cos θsin θReIm
The point e^{iθ} in the complex plane. Rotating by an angle θ along the circle of radius 1 lands at cos θ + i sin θ.

The worth of a formula becomes clear when it is used.

Example 4.3An imaginary number raised to an imaginary power is real

Let us compute iii^i. Taking θ=π/2\theta = \pi/2 in Theorem 4.1 gives eiπ/2=cosπ2+isinπ2=0+i=ie^{i\pi/2} = \cos\frac{\pi}{2} + i\sin\frac{\pi}{2} = 0 + i = i. Therefore

ii=(eiπ/2)i=eiiπ/2=eπ/2.i^{\,i} = \left(e^{i\pi/2}\right)^{i} = e^{i \cdot i\pi/2} = e^{-\pi/2}.

Numerically, π/2=1.5707963\pi/2 = 1.5707963\ldots, so

ii=e1.5707963=0.2078795i^{\,i} = e^{-1.5707963\ldots} = 0.2078795\ldots

An imaginary number raised to an imaginary power has turned into an ordinary positive real number.

One caveat. Since i=ei(π/2+2πn)i = e^{i(\pi/2 + 2\pi n)} for any integer nn, the same computation also yields the values ii=eπ/22πni^i = e^{-\pi/2 - 2\pi n}. Complex powers are multivalued, and the 0.20780.2078\ldots above is the principal value, obtained by taking n=0n = 0.

Proposition 4.4De Moivre's theorem

For every real number θ\theta and every integer n0n \ge 0,

(cosθ+isinθ)n=cosnθ+isinnθ.(\cos\theta + i\sin\theta)^n = \cos n\theta + i\sin n\theta.
Proof(Proposition 4.4)

By Theorem 4.1, cosθ+isinθ=eiθ\cos\theta + i\sin\theta = e^{i\theta}. The series of Definition 2.2 converges absolutely, so it may be multiplied out term by term, and the exponential law ezew=ez+we^{z}e^{w} = e^{z+w} follows. Applying it nn times,

(eiθ)n=eiθeiθ=einθ.\left(e^{i\theta}\right)^n = e^{i\theta}\cdots e^{i\theta} = e^{in\theta}.

Finally, applying Theorem 4.1 once more, this time to nθn\theta, gives einθ=cosnθ+isinnθe^{in\theta} = \cos n\theta + i\sin n\theta.

Proposition 4.4 is a machine for producing addition formulas. Taking n=2n = 2 and expanding the left-hand side,

(cosθ+isinθ)2=cos2θsin2θ+2isinθcosθ,(\cos\theta + i\sin\theta)^2 = \cos^2\theta - \sin^2\theta + 2i\sin\theta\cos\theta,

so merely comparing real and imaginary parts yields cos2θ=cos2θsin2θ\cos 2\theta = \cos^2\theta - \sin^2\theta and sin2θ=2sinθcosθ\sin 2\theta = 2\sin\theta\cos\theta at once. One need not memorise the addition formulas; they can be regenerated from the exponential law.

5. Mathematics that measures no shape: bridges and polyhedra

Section titled “5. Mathematics that measures no shape: bridges and polyhedra”

Among Euler’s works, those with the greatest influence on modern mathematics are the arguments that use neither length nor angle.

In the Prussian city of Königsberg (now Kaliningrad) seven bridges spanned the river Pregel. Whether one could take a walk crossing every bridge exactly once was a topic of conversation among the townspeople. In 1736 Euler abstracted the question as follows (a textbook instance of abstraction(Definition 3.1)[Why Mathematics Is Hard]). Regard each landmass as a point and each bridge as a line. Then neither the shape of the land nor the length of the bridges matters; all that remains is which landmass is joined to which, and by how many bridges.

graph LR
A["North bank A"] --- C["Island C"]
A --- C
B["South bank B"] --- C
B --- C
C --- D["East bank D"]
A --- D
B --- D
The bridges of Königsberg. The vertices are the four landmasses, the edges the seven bridges.

Definition 5.1Degree and traversability in one stroke

The number of edges incident to a vertex vv of a graph is called the degree of vv, written deg(v)\deg(v). A walk that traverses every edge of the graph exactly once is called an Eulerian path (an Eulerian circuit if the starting point and the endpoint coincide).

Proposition 5.2A necessary condition for traversability in one stroke

If a connected graph has an Eulerian path, then the number of vertices of odd degree is 00 or 22.

Proof(Proposition 5.2)

Fix an Eulerian path and imagine walking along it. Suppose a vertex vv is neither the start nor the end of the path. Then every time the path visits vv it necessarily enters by one edge and leaves by another. So if vv is visited kk times, exactly 2k2k of the edges incident to vv are used by the path. Since an Eulerian path uses every edge exactly once, those 2k2k edges are all the edges incident to vv. Hence deg(v)=2k\deg(v) = 2k is even.

Only the start and the end are exceptional. At the start there is one extra edge used only to leave, and at the end one extra edge used only to enter. If the start and the end are distinct, these two vertices have odd degree and all others are even. If the start and the end coincide, the two extra edges meet at the same vertex, so its degree is again even and there are no vertices of odd degree.

Therefore the number of vertices of odd degree is 00 or 22.

In the Königsberg diagram the degrees are deg(A)=3\deg(A) = 3, deg(B)=3\deg(B) = 3, deg(C)=5\deg(C) = 5 and deg(D)=3\deg(D) = 3 (the total number of edges is (3+3+5+3)/2=7(3+3+5+3)/2 = 7, which agrees with the number of bridges). There are four vertices of odd degree, so by Proposition 5.2 no Eulerian path exists. The walk is impossible.

Remark 5.3

The converse statement — that a connected graph with 00 or 22 vertices of odd degree does have an Eulerian path — is also true, and can be proved by induction on the number of edges (a proof may be found in textbooks on discrete mathematics, for instance Chapter 1 of R. Diestel, Graph Theory). Euler’s 1736 paper argued the necessary condition rigorously but gave no proof of sufficiency. The complete proof is due to Hierholzer in 1873.

Definition 5.4Plane graphs

A graph is called planar if it can be drawn in the plane so that edges meet only at their endpoints, and such a drawing is called a plane graph. The regions into which a plane graph divides the plane are its faces; the unbounded outer region counts as one face.

Theorem 5.5Euler's polyhedron formula

Let VV, EE and FF denote the numbers of vertices, edges and faces (the outer face included) of a connected plane graph. Then

VE+F=2.V - E + F = 2.

In particular the numbers of vertices, edges and faces of a convex polyhedron satisfy this relation.

Proof(Theorem 5.5)

We argue by induction on the number of edges EE.

(Base case.) Suppose the graph has no cycle. A connected graph without cycles is a tree, so E=V1E = V - 1 (a tree can be built up by adding one edge and one vertex at a time). A tree does not divide the plane, so there is only the outer face and F=1F = 1. Therefore

VE+F=V(V1)+1=2.V - E + F = V - (V-1) + 1 = 2.

(Inductive step.) Suppose the graph has a cycle. Choose an edge ee lying on that cycle and delete it. Deleting an edge of a cycle leaves the graph connected, since its two endpoints can still reach each other along the rest of the cycle.

Because ee lies on a cycle, the two sides of ee in the plane belong to two distinct faces. (This follows from the Jordan curve theorem, the fact that a closed curve in the plane separates it into an inside and an outside. Intuitively obvious, but by no means easy to prove rigorously.) Deleting ee merges these two faces into one. Thus EE decreases by 11, FF decreases by 11, and VV is unchanged, so the value of VE+FV - E + F does not change.

As long as a cycle remains this operation can be repeated, and the number of edges decreases each time, so after finitely many steps no cycle remains and we are reduced to the base case. Since the value there is 22, the original graph also satisfies VE+F=2V - E + F = 2.

As for convex polyhedra: pick a point inside one face and project the surface of the polyhedron from that point onto a plane (equivalently, think of the polyhedron as a rubber membrane and stretch one face wide open, flattening the rest). This yields a connected plane graph with the same vertices and edges. The flattened face corresponds to the outer face, so the number of faces agrees as well. Hence the identity above applies verbatim.

Let us confirm this with an example. The regular dodecahedron has 12 pentagonal faces. Each face has 5 edges and each edge is shared by 2 faces, so

E=12×52=30.E = \frac{12 \times 5}{2} = 30.

Three faces meet at each vertex, so

V=12×53=20.V = \frac{12 \times 5}{3} = 20.

Therefore

VE+F=2030+12=2,V - E + F = 20 - 30 + 12 = 2,

in agreement with Theorem 5.5. The same computation for the regular icosahedron (V=12, E=30, F=20V = 12,\ E = 30,\ F = 20) gives 1230+20=212 - 30 + 20 = 2.

Theorem 5.5 also plays a decisive role in the discussion of the four colour theorem, because the fact that every plane graph contains a vertex of degree at most 5 (the existence of a vertex of small degree(Corollary 3.4)[The Four Color Theorem]) is derived from this identity. That fact is the starting point of the proof of the five colour theorem(Theorem 4.3)[The Four Color Theorem] (see The four colour theorem). An argument that uses neither length nor angle turns out to support an entirely different problem, that of colouring maps.

6. Ramanujan: 3900 formulas written in notebooks

Section titled “6. Ramanujan: 3900 formulas written in notebooks”

6.1. From clerk to Fellow of the Royal Society

Section titled “6.1. From clerk to Fellow of the Royal Society”

Srinivasa Ramanujan was born in 1887 in Erode, in southern India. His mathematical education was close to self-instruction, and the decisive influence was a book he obtained around the age of fifteen: G. S. Carr’s A Synopsis of Elementary Results in Pure Mathematics. The book lists some 5000 formulas without proofs; anyone wanting a proof has to construct it himself. Ramanujan did exactly that. His lifelong style of setting down results without proofs was probably formed here.

At college he showed no interest in subjects other than mathematics, lost his scholarship and dropped out. From 1912 he worked as a clerk at the Madras Port Trust while filling notebooks with formulas.

On 16 January 1913 he wrote to G. H. Hardy at Cambridge. The letter contained about 120 formulas, all without proofs. Hardy spent an evening examining it with his colleague Littlewood and reached his famous conclusion: some were known, some he and Littlewood could prove, but the rest were so strange that they could not possibly be true, and yet were not the sort of thing anyone could have fabricated. Hardy invited Ramanujan to Cambridge, and in April 1914 he sailed for England.

In wartime Britain, Ramanujan, a vegetarian, struggled to obtain suitable food and his health failed. Even so, in 1918 he was elected a Fellow of the Royal Society and, in the same year, a Fellow of Trinity College. He returned to India in 1919 and died in April 1920 at the age of thirty-two. The cause of death was long taken to be tuberculosis, but since D. A. B. Young’s re-examination of the medical records in 1994 it has been thought more likely to have been hepatic amoebiasis.

Example 6.11729

While Ramanujan was in hospital, Hardy came to visit and remarked that the taxi he had taken bore the number 1729, a rather dull number. Ramanujan answered at once: “No, it is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways.”

Let us verify this.

13+123=1+1728=1729,93+103=729+1000=1729.1^3 + 12^3 = 1 + 1728 = 1729,\qquad 9^3 + 10^3 = 729 + 1000 = 1729.

Minimality can be checked too. There are only finitely many pairs of positive integers with a3+b31729a^3 + b^3 \le 1729 and aba \le b, so by letting bb run from 11 to 1212 and writing them all out, one confirms in finitely many steps that no number smaller than 17291729 has two such representations. Carrying out the exhaustive search, the next smallest is

4104=23+163=8+4096,4104=93+153=729+3375.4104 = 2^3 + 16^3 = 8 + 4096,\qquad 4104 = 9^3 + 15^3 = 729 + 3375.

The anecdote is usually told as evidence that Ramanujan knew numbers as one knows one’s friends. But there is also a prosaic explanation. We have 1729=7×13×191729 = 7 \times 13 \times 19, and in the theory of sums of cubes the factorisation x3+y3=(x+y)(x2xy+y2)x^3 + y^3 = (x+y)(x^2-xy+y^2) plays a central role. The neighbourhood of 1729 was territory he had crossed many times in his work on elliptic curves and cubic forms. The truth is probably that intuition does not arise out of nothing; it operates only on familiar ground.

In his 1914 paper “Modular equations and approximations to π\pi”, Ramanujan gave a number of series for computing π\pi. The most famous is the following.

Theorem 6.2Ramanujan's series for π

1π=229801k=0(4k)!(1103+26390k)(k!)43964k\frac{1}{\pi} = \frac{2\sqrt{2}}{9801}\sum_{k=0}^{\infty}\frac{(4k)!\,\bigl(1103 + 26390k\bigr)}{(k!)^4\,396^{4k}}

holds.

Remark 6.3

Ramanujan attached no proof to this formula. Behind him lay the theory of modular equations (the algebraic equations satisfied by elliptic modular functions), but a complete proof of this series was published only in 1987, in the work of the brothers Jonathan and Peter Borwein. That is seventy-three years from discovery to proof. The proof lies far beyond the scope of this article; see the book by Borwein and Borwein listed in the references.

Example 6.4Seven decimal places from the first term alone

Take only the k=0k = 0 term on the right-hand side of Theorem 6.2. Since (40)!=0!=1(4\cdot 0)! = 0! = 1, (0!)4=1(0!)^4 = 1 and 3960=1396^0 = 1, the k=0k = 0 term is 11031103. Hence

1π22×11039801π980122×1103.\frac{1}{\pi} \approx \frac{2\sqrt{2} \times 1103}{9801} \quad\Longleftrightarrow\quad \pi \approx \frac{9801}{2\sqrt{2}\times 1103}.

Let us compute. Since 22=2.82842712472\sqrt{2} = 2.8284271247\ldots,

22×1103=3119.75511862\sqrt{2}\times 1103 = 3119.7551186\ldots98013119.7551186=3.14159273\frac{9801}{3119.7551186\ldots} = 3.14159273\ldots

The true value is π=3.14159265\pi = 3.14159265\ldots. The error is about 7.6×1087.6\times 10^{-8}: a single fraction correct to seven decimal places.

Why is it so fast? Look at the ratio of consecutive terms. The quantity (4k)!/(k!)4(4k)!/(k!)^4 grows roughly like 256k256^k, while the denominator 3964k396^{4k} grows like the kk-th power of 3964=24,591,257,856396^4 = 24{,}591{,}257{,}856. So each additional term multiplies the size of the term by roughly

2563964=25624,591,257,8561.04×108,\frac{256}{396^4} = \frac{256}{24{,}591{,}257{,}856} \approx 1.04\times 10^{-8},

that is, each term gains about 8 digits of accuracy. Two terms give about 16 digits, three about 24. Compared with the Leibniz series π4=113+15\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \cdots, which needs ten times as many terms for each extra digit, the phrase “orders of magnitude” applies quite literally.

This lineage lives on in modern computations of π\pi. The formula published by the Chudnovsky brothers in 1988,

1π=12k=0(1)k(6k)!(13591409+545140134k)(3k)!(k!)36403203k+3/2,\frac{1}{\pi} = 12\sum_{k=0}^{\infty}\frac{(-1)^k (6k)!\,(13591409 + 545140134k)}{(3k)!\,(k!)^3\,640320^{3k + 3/2}},

gains about 14 digits per term, and essentially every current world record for computing π\pi has been set with it. Its structure is the same as Ramanujan’s: a shape originating in modular equations.

6.4. Partitions and the Hardy–Ramanujan formula

Section titled “6.4. Partitions and the Hardy–Ramanujan formula”

Among Ramanujan’s works, one of those with the greatest subsequent influence concerns the partition function.

Definition 6.5The partition function

The number of ways of writing a positive integer nn as a sum of positive integers, disregarding order, is denoted p(n)p(n) and called the number of partitions of nn. We set p(0)=1p(0) = 1 by convention.

For instance, the partitions of 44 are

4,3+1,2+2,2+1+1,1+1+1+1,4,\quad 3+1,\quad 2+2,\quad 2+1+1,\quad 1+1+1+1,

five in all, so p(4)=5p(4) = 5. The function p(n)p(n) grows rapidly: p(10)=42p(10) = 42, p(50)=204226p(50) = 204226, p(100)=190569292p(100) = 190569292.

Theorem 6.6The Hardy–Ramanujan asymptotic formula

The partition function satisfies

p(n)14n3exp ⁣(π2n3)(n),p(n) \sim \frac{1}{4n\sqrt{3}}\,\exp\!\left(\pi\sqrt{\frac{2n}{3}}\right) \qquad (n \to \infty),

where \sim means that the ratio of the two sides tends to 11 as nn \to \infty.

Remark 6.7

The proof is due to the joint paper of Hardy and Ramanujan of 1918. The technique they devised is called the circle method: one integrates the generating function around the unit circle in the complex plane and adds up the contributions from neighbourhoods of the rational points. The method was later developed by Vinogradov and others and produced results in additive number theory such as “every sufficiently large odd number is a sum of three primes”. Here is a tool built for a single formula that became standard equipment for an entire field. Refining this asymptotic formula further, Rademacher obtained in 1937 a convergent series giving the exact value of p(n)p(n).

Example 6.8Measuring the accuracy at n = 100

Let us put n=100n = 100 into the right-hand side of Theorem 6.6. The exponent is

π2003=π×8.164966=25.65099\pi\sqrt{\frac{200}{3}} = \pi\times 8.164966\ldots = 25.65099\ldots

so exp(25.65099)=1.38065×1011\exp(25.65099\ldots) = 1.38065\ldots\times 10^{11}. The denominator is

4×100×3=692.82034 \times 100 \times \sqrt{3} = 692.8203\ldots

Hence the approximation is

1.38065×1011692.8203=1.9928×108199,280,000.\frac{1.38065\times 10^{11}}{692.8203} = 1.9928\times 10^{8} \approx 199{,}280{,}000.

The true value is p(100)=190,569,292p(100) = 190{,}569{,}292, so the ratio is 1.04571.0457 and the error about 4.6%4.6\%. To come within 5 per cent already at a value as small as n=100n = 100 is remarkably good for an asymptotic formula. As nn grows the ratio approaches 11.

Example 6.9Ramanujan's congruences

Ramanujan discovered the following divisibility properties of the partition function.

p(5n+4)0(mod5),p(7n+5)0(mod7),p(11n+6)0(mod11).p(5n+4) \equiv 0 \pmod 5,\qquad p(7n+5) \equiv 0 \pmod 7,\qquad p(11n+6) \equiv 0 \pmod{11}.

Let us check the first for small nn: p(4)=5p(4) = 5, p(9)=30p(9) = 30, p(14)=135p(14) = 135, p(19)=490p(19) = 490. In order, 5,30,135,4905, 30, 135, 490 — all multiples of 55.

Now p(n)p(n) is the total number of ways of splitting up nn, a quantity with no apparent connection to 55 or to 77. Yet viewed along an arithmetic progression it suddenly becomes cleanly divisible. Ramanujan is said to have found this while gazing at a table of partition numbers. Detecting laws by staring at numerical tables was precisely his greatest strength.

7. The difference between the two is not “intuition versus logic”

Section titled “7. The difference between the two is not “intuition versus logic””

Euler and Ramanujan are often described as opposites. Placed side by side, however, it is the similarities that stand out.

EulerRamanujan
Dates1707–1783 (aged 76)1887–1920 (aged 32)
EducationUniversity of Basel, studied under Johann BernoulliLargely self-taught (Carr’s synopsis)
Principal centresSt Petersburg, BerlinMadras, Cambridge
Mode of discoveryFormal manipulation of series, massive numerical experimentObservation of numerical tables, modular equations
Attitude to proofUsually supplied, but not shy of leapsRarely supplied
What they leftAbout 866 papers and booksAbout 3900 formulas in notebooks

Both worked in the same order: compute a great deal, find a law, and only then (if at all) think about justification. As we saw in the proof of Theorem 3.1, Euler’s argument too contains a leap beyond the standards of his time. Conversely, although Ramanujan is called a man of intuition, his notebooks are covered with the traces of enormous hand computations, and most of his formulas had been checked numerically.

The real difference lies in what each counted as a proof. In eighteenth-century Europe there was as yet no consensus on whether infinite series and infinite products could be handled like finite expressions, and if the manipulation worked, that was evidence of its correctness. In early twentieth-century Cambridge matters stood otherwise, and Hardy was known as a defender of rigour. Stories are told of Ramanujan being nonplussed when asked why something was true; but this reflects the difference between the mathematical cultures in which they were raised rather than any deficiency of his.

These two men also show that an assertion without a proof does not thereby lose its value. Ramanujan’s notebooks were edited with commentary by Bruce Berndt in five volumes published between 1985 and 1998, and nearly all the recorded results were confirmed correct. The mock theta functions written in the “lost notebook”, which George Andrews found in the Trinity College library in 1976, long resisted identification; then Sander Zwegers’s 2002 doctoral thesis placed them within the framework of harmonic Maass forms, and today they appear even in the counting of black hole entropy. Functions jotted down just before their author’s death gave birth to a branch of theory eighty years later.

The advance of mathematics has at least two phases: finding a new truth and establishing that it is true. The first calls for boldness, the second for rigour. Sometimes both operate within one person; sometimes, as with Ramanujan and the Borwein brothers, they are divided across seventy years. When mathematics feels hard, distinguishing which of the two difficulties one is facing changes how to respond (this point, together with an account of what a proof is(Definition 4.1)[Why Mathematics Is Hard], is treated in Why is mathematics hard?). For an assertion that still survives without a proof, the Collatz conjecture is the typical example: numerical verification piles up without limit while a proof remains absent (see the current state of computational verification(Remark 7.3)[The Collatz Conjecture]).

Exercise 8.1Easy

Using Theorem 4.1, prove the following.

(1) (1+i)8=16(1+i)^8 = 16.

(2) cos3θ=4cos3θ3cosθ\cos 3\theta = 4\cos^3\theta - 3\cos\theta.

Solution

(1) Put 1+i1 + i into polar form. Its modulus is 1+i=12+12=2|1+i| = \sqrt{1^2+1^2} = \sqrt{2} and its argument is π/4\pi/4, so

1+i=2(cosπ4+isinπ4)=2eiπ/4.1 + i = \sqrt{2}\left(\cos\frac{\pi}{4} + i\sin\frac{\pi}{4}\right) = \sqrt{2}\,e^{i\pi/4}.

Therefore

(1+i)8=(2)8ei8π/4=16e2πi.(1+i)^8 = \left(\sqrt{2}\right)^8 e^{i\cdot 8\pi/4} = 16\,e^{2\pi i}.

By Theorem 4.1, e2πi=cos2π+isin2π=1+0i=1e^{2\pi i} = \cos 2\pi + i\sin 2\pi = 1 + 0i = 1, so (1+i)8=16(1+i)^8 = 16.

Direct computation confirms it: (1+i)2=1+2i+i2=2i(1+i)^2 = 1 + 2i + i^2 = 2i, (1+i)4=(2i)2=4(1+i)^4 = (2i)^2 = -4, (1+i)8=(4)2=16(1+i)^8 = (-4)^2 = 16. The two agree.

(2) Apply Proposition 4.4 with n=3n = 3:

cos3θ+isin3θ=(cosθ+isinθ)3.\cos 3\theta + i\sin 3\theta = (\cos\theta + i\sin\theta)^3.

Expand the right-hand side by the binomial theorem. Abbreviating c=cosθc = \cos\theta and s=sinθs = \sin\theta,

(c+is)3=c3+3c2(is)+3c(is)2+(is)3=c3+3ic2s3cs2is3.(c + is)^3 = c^3 + 3c^2(is) + 3c(is)^2 + (is)^3 = c^3 + 3ic^2 s - 3cs^2 - is^3.

Comparing real parts gives cos3θ=c33cs2\cos 3\theta = c^3 - 3cs^2. Substituting s2=1c2s^2 = 1 - c^2,

cos3θ=c33c(1c2)=c33c+3c3=4c33c,\cos 3\theta = c^3 - 3c(1 - c^2) = c^3 - 3c + 3c^3 = 4c^3 - 3c,

which is the required identity.

Exercise 8.2Standard

Consider a polyhedron of football (soccer ball) type: every face is a regular pentagon or a regular hexagon, and exactly three faces meet at every vertex. Show that the number of pentagonal faces is necessarily 12 (the same computation also shows that the number of hexagons is not determined).

Solution

Let PP be the number of pentagons and HH the number of hexagons.

Number of faces. F=P+HF = P + H.

Number of edges. Each pentagon has 5 edges and each hexagon 6, and every edge is shared by exactly 2 faces. Counting edges face by face counts each edge twice, so

E=5P+6H2.E = \frac{5P + 6H}{2}.

Number of vertices. Counting vertices face by face counts each vertex once for every face meeting there. By hypothesis three faces meet at every vertex, so

V=5P+6H3.V = \frac{5P + 6H}{3}.

Substitute these into Theorem 5.5. From VE+F=2V - E + F = 2,

5P+6H35P+6H2+(P+H)=2.\frac{5P+6H}{3} - \frac{5P+6H}{2} + (P + H) = 2.

Multiplying both sides by 6,

2(5P+6H)3(5P+6H)+6(P+H)=12,2(5P+6H) - 3(5P+6H) + 6(P+H) = 12,(5P+6H)+6P+6H=12,-(5P + 6H) + 6P + 6H = 12,P=12.P = 12.

The quantity HH has disappeared from the equation and is subject to no constraint whatever. So there are always 12 pentagons, while the number of hexagons varies with the shape. The actual football (the truncated icosahedron) has H=20H = 20, giving F=32F = 32, E=(60+120)/2=90E = (60+120)/2 = 90 and V=180/3=60V = 180/3 = 60, so that 6090+32=260 - 90 + 32 = 2. The case H=0H = 0 is the regular dodecahedron.

Incidentally, the carbon molecule C60_{60} (fullerene) has exactly this shape for the same reason. The conclusion that 12 pentagons are needed is dictated not by chemistry but by Theorem 5.5.

Exercise 8.3Standard

(1) Verify that 41044104 can be written as a sum of two cubes in two ways.

(2) Describe a procedure that verifies, in finitely many steps, that no positive integer smaller than 17291729 is a sum of two positive cubes in two different ways. (You need not carry out all the computations; explain what has to be checked and how many times.)

Solution

(1)

23+163=8+4096=4104,93+153=729+3375=4104.2^3 + 16^3 = 8 + 4096 = 4104,\qquad 9^3 + 15^3 = 729 + 3375 = 4104.

Both equal 41044104.

(2) Suppose N<1729N < 1729 can be written as N=a3+b3N = a^3 + b^3 with 1ab1 \le a \le b. Then b3<1729b^3 < 1729, so b12b \le 12 (since 123=1728<1729133=219712^3 = 1728 < 1729 \le 13^3 = 2197). Hence it suffices to examine all pairs with 1ab121 \le a \le b \le 12. The number of such pairs is

(122)+12=66+12=78.\binom{12}{2} + 12 = 66 + 12 = 78.

Compute the 78 values a3+b3a^3 + b^3, keep those below 17291729, and check whether any value occurs twice or more. The decision is completed in finitely many steps (at most 78 additions).

Carrying this out, no repetition occurs below 17291729, and the first repetition is 1729=13+123=93+1031729 = 1^3 + 12^3 = 9^3 + 10^3. Generalising this “smallest number expressible as a sum of two cubes in two ways”, the smallest number so expressible in nn ways is called the nn-th taxicab number. Leech found Ta(3)=87539319\mathrm{Ta}(3) = 87539319 in 1957 and a candidate for Ta(6)\mathrm{Ta}(6) was found in 2008, but Ta(7)\mathrm{Ta}(7) and beyond remain undetermined.

Exercise 8.4Standard

Suppose we wish to add exactly one new bridge to the Königsberg diagram of §5.1 so that a walk crossing every bridge exactly once becomes possible. Give one place where the bridge may be built, and state the starting point and endpoint of the resulting walk.

Solution

The present degrees are deg(A)=3\deg(A) = 3, deg(B)=3\deg(B) = 3, deg(C)=5\deg(C) = 5 and deg(D)=3\deg(D) = 3, so there are four vertices of odd degree. By Proposition 5.2, no Eulerian path exists in this state.

Adding one bridge raises the degree of each of its two endpoints by 1. To reduce the number of odd-degree vertices from four to two, the new bridge must join two vertices of odd degree (since an odd number plus 1 is even).

For instance, build a bridge joining AA (the north bank) directly to BB (the south bank). Then

deg(A)=4,deg(B)=4,deg(C)=5,deg(D)=3,\deg(A) = 4,\quad \deg(B) = 4,\quad \deg(C) = 5,\quad \deg(D) = 3,

so the only vertices of odd degree are CC and DD. By the sufficient condition mentioned in Remark 5.3, an Eulerian path exists. Its starting point and endpoint are the two odd-degree vertices, namely the island CC and the east bank DD (either may serve as the start).

Bridges joining AA to DD, BB to DD, or AA to CC work equally well; in each case the two remaining odd-degree vertices are the start and the end. On the other hand, adding a loop from AA to AA (a bridge with both ends on the same landmass) raises deg(A)\deg(A) by 2, leaving it odd, so that does not solve the problem.

  • W. Dunham, Euler: The Master of Us All, Mathematical Association of America, 1999 — the chapters on the Basel problem and the polyhedron formula. The exposition lets one follow Euler’s original arguments directly.
  • Takagi Teiji, Kaiseki Gairon (A Course of Analysis), Iwanami Shoten (in Japanese) — absolute convergence of series and term-by-term operations; the series definition of the exponential function.
  • Sugiura Mitsuo, Kaiseki Nyūmon I (Introduction to Analysis I), University of Tokyo Press, 1980 (in Japanese) — the complex exponential function and Euler’s formula.
  • G. H. Hardy, Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, Cambridge University Press, 1940 — Hardy’s own assessment of Ramanujan; the chapters on partitions and on the series for π\pi.
  • R. Kanigel, The Man Who Knew Infinity, Charles Scribner’s Sons, 1991 — the standard biography of Ramanujan.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM: A Study in Analytic Number Theory and Computational Complexity, Wiley, 1987 — proofs of Ramanujan-type series, including Theorem 6.2.
  • B. C. Berndt, Ramanujan’s Notebooks, Parts I–V, Springer, 1985–1998 — the complete annotated edition of Ramanujan’s notebooks.
  • R. Diestel, Graph Theory, Springer — the chapters on the existence condition for Eulerian paths and on planar graphs.

Appendix: why “same zeros, same factorisation” is dangerous

Section titled “Appendix: why “same zeros, same factorisation” is dangerous”

The issue. What Euler used in the proof of Theorem 3.1 was the following inference. If a function ff satisfies f(0)=1f(0) = 1 and has zeros r1,r2,r_1, r_2, \ldots, then

f(x)=n(1xrn).f(x) = \prod_{n}\left(1 - \frac{x}{r_n}\right).

For a polynomial of finite degree this is a correct theorem. For a function with infinitely many zeros it fails in general.

A counterexample. Consider g(x)=exsinxxg(x) = e^{x}\dfrac{\sin x}{x}. Since exe^x never vanishes, the zeros of gg are exactly the zeros of sinxx\frac{\sin x}{x}, namely x=±π,±2π,x = \pm\pi, \pm 2\pi, \ldots. Moreover g(0)=e01=1g(0) = e^0 \cdot 1 = 1. So gg shares with sinxx\frac{\sin x}{x} both the value "f(0)=1f(0) = 1" and the set of zeros. Nevertheless gg and sinxx\frac{\sin x}{x} are plainly different functions: at x=π/2x = \pi/2, for instance, the former equals eπ/22π=3.06e^{\pi/2}\cdot\frac{2}{\pi} = 3.06\ldots while the latter equals 2π=0.6366\frac{2}{\pi} = 0.6366\ldots

Hence the zeros together with the value of f(0)f(0) do not determine a function. Had one naively expanded an infinite product for gg and compared coefficients, one would have obtained a wrong value for 1/n2\sum 1/n^2. Euler’s conclusion was correct because sinxx\frac{\sin x}{x} happened to be of the kind that carries no superfluous exponential factor.

The correct framework. Weierstrass’s factorisation theorem asserts that an entire function ff (one holomorphic on the whole complex plane) can be written as

f(z)=zmeh(z)nEpn ⁣(zrn).f(z) = z^m e^{h(z)}\prod_{n}E_{p_n}\!\left(\frac{z}{r_n}\right).

The point is that a zero-free correction factor eh(z)e^{h(z)} is built in from the start, and the exe^x of the counterexample above is exactly such a factor. That this correction factor is the constant 11 in the case of sinzz\frac{\sin z}{z} follows from an estimate of the order of growth (Hadamard’s factorisation theorem). Only once that has been checked is the proof of Theorem 3.1 complete.

The lesson. When a rule valid in the finite case is carried over to the infinite, one cannot know in advance what will break. Euler carried it over, checked numerically, and hit the right answer. Nineteenth-century analysis may be described as the work of writing down explicitly the conditions under which such transfers are legitimate. That discovery and justification should proceed in this order is, in mathematics, rather the norm.

Report an error in this article ・Operated by: Mugen Giken LLCPricingTermsLegal notice

© 2026 夢現技研合同会社 ・Feeding the text to an LLM is welcome. Code samples are MIT licensed.