Ramanujan's mathematics still informs string theory, cryptography

The Man Who Knew Infinity

In January 1913, a letter arrived at the desk of G.H. Hardy, one of Britain's most distinguished mathematicians at Cambridge University. It was from an unknown Indian clerk working at the Madras Port Trust — a 25-year-old named Srinivasa Ramanujan who had no formal university education, no academic title, and no institutional backing.

The letter contained 120 mathematical theorems. Hardy later described his first reaction: he assumed the writer was a fraud. No untrained clerk could produce mathematics of this quality. But as he worked through the results with his colleague J.E. Littlewood, his disbelief turned to astonishment. Many of the theorems were entirely new. Some were results Hardy had never seen. A few were so advanced, so unexpected, they seemed to arrive from another dimension of mathematical thought.

Hardy's verdict: "They must be true, because, if they were not true, no one would have had the imagination to invent them."

"An equation has no meaning to me unless it expresses a thought of God." — Srinivasa Ramanujan

Srinivasa Ramanujan (1887–1920) lived for just 32 years. In that time — working largely in isolation, with almost no formal training, in colonial India — he produced mathematics that mathematicians are still fully understanding a century later. His work on partition theory, infinite series, mock theta functions, and modular forms has found unexpected applications in string theory, cryptography, black hole physics, and computer science.

Every December 22 — Ramanujan's birthday — India celebrates National Mathematics Day: a tribute to a genius who proved that mathematical truth transcends every boundary of education, background, and circumstance.

This is his story, his mathematics, and why it still echoes through the foundations of modern science.

Ramanujan: From Erode to Eternity

The arc of Ramanujan's life defies every conventional narrative about how great science gets done. No elite university. No prestigious supervisor. No research grants. Just a young man in colonial India, a worn copy of an outdated textbook, and an inexhaustible interior fire.

The story of Ramanujan is a story about the independence of mathematical truth from circumstance. Genius does not require permission.

The Language Ramanujan Spoke: Number Theory and Infinite Series

To appreciate Ramanujan's work, we need to understand the mathematical landscape he inhabited. His genius was concentrated in areas of pure mathematics where the objects are numbers themselves — their patterns, their partitions, their relationships across infinite sums and products.

Partition Theory: Counting the Uncountable

A partition of a positive integer n is a way of writing n as a sum of positive integers (where order doesn't matter). The function p(n) counts the number of partitions.

For small numbers:

The growth is explosive. How fast does p(n) grow?

Ramanujan and Hardy answered this with one of the most beautiful asymptotic formulas in all of mathematics (the Hardy-Ramanujan formula, 1918):

p(n) ≈ (1 / 4n√3) × e^(π√(2n/3))

This formula, derived using the "circle method" they invented together, gives the exact asymptotic behavior of p(n). For n = 200, it predicts 3,972,999,029,388 — exact to all 13 digits.

The Ramanujan Congruences: Hidden Symmetries

Even more remarkable was Ramanujan's discovery of unexpected periodicities in the partition function:

p(5k + 4) ≡ 0 (mod 5) — for all k ≥ 0 p(7k + 5) ≡ 0 (mod 7) — for all k ≥ 0 p(11k + 6) ≡ 0 (mod 11) — for all k ≥ 0

In plain English: every partition number of the form 5k+4 is exactly divisible by 5. Every partition number 7k+5 is divisible by 7. This is not obvious — it has no simple explanation from the definition of partitions. Ramanujan found it empirically, from inspecting tables. Hardy called it "one of the most surprising results in all of combinatorics."

The explanation required a completely new branch of mathematics — modular forms — developed over the following 70 years. Freeman Dyson conjectured in 1944 that there must be a "combinatorial" explanation via what he called "rank" — a concept proven only in 1988 by Garvan and Andrews.

Infinite Series and the Number π

Ramanujan discovered extraordinarily fast-converging infinite series for 1/π. His most famous:

1/π = (2√2 / 9801) × Σ [(4n)! × (1103 + 26390n)] / [(n!)⁴ × 396^(4n)]

where the sum runs from n = 0 to infinity.

Each term of this series adds approximately 8 decimal digits of π. At n = 0 alone: 1/π ≈ 2√2 × 1103/9801, giving π correct to 6 decimal places.

This series was not proven rigorously until the Chudnovsky brothers verified it in 1987 using the theory of complex multiplication. It remains the basis for world-record π computation algorithms — the 2021 record of 62.8 trillion digits of π used algorithms derived from Ramanujan's series.

What is the taxicab number 1729?

The most famous anecdote in mathematical history: Hardy visited the ailing Ramanujan in hospital and mentioned he had arrived in a taxi numbered 1729 — "a rather dull number." Ramanujan immediately replied:

"No, Hardy! No, Hardy! It is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways."

1729 = 1³ + 12³ = 9³ + 10³

This is the second taxicab number Ta(2). The study of taxicab numbers — smallest integers expressible as sums of nth powers in k different ways — became a rich branch of number theory.

Ramanujan's near-instantaneous recognition of this property, while lying ill in a hospital bed, has never been satisfactorily explained. It suggests a form of mathematical intuition operating at a level entirely different from ordinary calculation.

Ramanujan Summation: 1 + 2 + 3 + ... = −1/12

One of Ramanujan's most controversial results appears in his notebooks:

1 + 2 + 3 + 4 + ... = −1/12

This seems impossible — the sum clearly diverges to infinity. But Ramanujan was computing a specific analytic continuation of the Riemann zeta function ζ(s) at s = −1:

ζ(−1) = −1/12

This is not the ordinary sum. It is the Ramanujan summation — a regularization technique that extracts a finite value from divergent series by analytic continuation. Remarkably, this exact value −1/12 appears in:

The universe, it seems, uses Ramanujan's arithmetic.

Mock Theta Functions and Modular Forms

Ramanujan's deepest and most mysterious contribution came in his final weeks of life — a class of functions he called mock theta functions, described in a letter to Hardy dated January 12, 1920, just three months before his death.

Theta Functions: The Classical Background

A theta function is a special type of function with extraordinary symmetry properties. The simplest is:

θ(q) = Σ q^(n²) for |q| less than 1, where the sum runs over all integers n

Theta functions satisfy beautiful modular transformation laws — when you replace q with a transformed version (e.g., q → e^(−t)), the function transforms in a highly symmetric way. These transformations encode deep number theory and connect to elliptic curves, lattices, and the geometry of complex numbers.

The Mock Theta Mystery

Ramanujan defined functions like:

f(q) = 1 + Σ [q^(n²) / ((1+q)²(1+q²)²...(1+q^n)²)]

summing from n = 1 to infinity.

He called these "mock theta functions" because they almost behave like theta functions near the boundary of their domain (the unit circle |q| = 1), but not quite. He wrote to Hardy:

"I discovered very interesting functions recently which I call 'Mock' theta-functions. Unlike the 'False' theta-functions (studied partially by Rogers) they enter into mathematics as beautifully as the ordinary theta functions. I believe that they are of the same importance as the elliptic functions."

What exactly made them "mock"? Ramanujan couldn't say. He had no framework. He could only describe their behavior through examples and partial properties.

The 80-Year Gap

For 80 years, mock theta functions were a central mystery of mathematics. Mathematicians knew they were important but couldn't explain WHY they differed from true theta functions or what the precise mathematical definition should be.

The key advances:

Harmonic Maass Forms: The Modern Framework

Zwegers showed that each mock theta function f(τ) is the "holomorphic part" of a harmonic Maass form M(τ):

M(τ) = f(τ) + f(τ)*

where f(τ)* is a non-holomorphic "completion" term involving an integral over a specific path. The completed form M(τ) transforms exactly like a modular form — the transformation law Ramanujan sensed but couldn't quite grasp.

The key equation governing the completion:

∂̄ M(τ) = g(τ̄)

where ∂̄ is the antiholomorphic derivative and g is a classical theta function. This is a partial differential equation — Ramanujan was working with objects that are solutions to PDEs he never knew existed.

Ramanujan's Master Theorem

Another towering result: the Ramanujan Master Theorem provides a formula for the Mellin transform of a power series:

∫₀^∞ x^(s−1) [φ(0) − x·φ(1) + x²·φ(2) − ...] dx = (π/sin(πs)) × φ(−s)

This is a powerful analytic tool with applications in physics integrals. Hardy called it "one of Ramanujan's most far-reaching results."

The Rogers-Ramanujan Identities

Two stunning results discovered independently by Rogers (1894) and Ramanujan (around 1913):

Identity 1: 1 + Σ [q^(n²) / (1-q)(1-q²)...(1-q^n)] = 1/[(1-q)(1-q⁴)(1-q⁶)(1-q⁹)...]

Identity 2: 1 + Σ [q^(n(n+1)) / (1-q)(1-q²)...(1-q^n)] = 1/[(1-q²)(1-q³)(1-q⁷)(1-q⁸)...]

These connect partition theory to the theory of q-series and have deep connections to the representation theory of infinite-dimensional Lie algebras, statistical mechanics (the hard hexagon model), and conformal field theory.

The Australian physicist R.J. Baxter, working on exactly solvable models in statistical mechanics in 1980, independently rediscovered the Rogers-Ramanujan identities — not knowing Ramanujan had found them 65 years earlier. The same mathematical structure governs both the pure number theory and the physics of phase transitions.

Where Ramanujan's Mathematics Lives Today

Ramanujan did pure mathematics — he had no interest in applications, and was guided entirely by aesthetics and an inner sense of mathematical truth. Yet his results have colonized physics, computer science, and cryptography in ways he could never have imagined.

String Theory: The Number 24

One of the strangest appearances of Ramanujan's mathematics in physics involves the critical dimension of string theory.

In bosonic string theory, quantum mechanical consistency requires the theory to exist in exactly 26 spacetime dimensions (10 for superstring theory, 26 for bosonic). The calculation that shows this involves the sum:

the divergent series 1 + 2 + 3 + ... , which Ramanujan summation and the zeta function both assign the finite value ζ(−1) = −1/12. Carrying that value through the consistency condition requires D − 2 = 24, hence D = 26.

The number 24 also appears in Ramanujan's work on the Ramanujan tau function τ(n), defined by:

Δ(q) = q × Π(1 − q^n)^24 = Σ τ(n) × q^n

This is a modular form of weight 24 — the 24 is not a coincidence. The same 24-dimensional structure that makes string theory consistent in 26 dimensions is the same 24 that appears in Ramanujan's cusp form. String theorists and mathematicians were, without knowing it, studying the same object from different directions.

Black Hole Entropy and Mock Theta Functions

Work by Atish Dabholkar, Sameer Murthy, Don Zagier and others has since shown that the quantum degeneracy of 1/4-BPS black holes in string theory is described by mock modular forms — one of the functions in Ramanujan's last letter to Hardy.

The black hole partition function:

Z_BH(q) = Σ d(n) × q^n

where d(n) counts the number of microstates at energy level n, is a mock modular form. This connects:

A terminally ill 32-year-old in colonial India was computing the partition functions of black holes.

Cryptography: Elliptic Curves and Modular Forms

Modern elliptic curve cryptography (ECC) — the basis of security in HTTPS, Bitcoin, and Signal — relies fundamentally on the arithmetic of elliptic curves and their relationship to modular forms.

The modularity theorem (formerly the Taniyama-Shimura conjecture, proven as part of the proof of Fermat's Last Theorem by Wiles in 1995) states:

Every elliptic curve over the rationals corresponds to a modular form.

The modular forms central to this theorem are precisely the type Ramanujan studied. His tau function Δ(q) was the first example of what is now called a Hecke eigenform — a fundamental building block in the theory.

When your browser connects securely to a website using ECDSA (Elliptic Curve Digital Signature Algorithm), it uses mathematics whose theoretical foundations include Ramanujan's work on modular forms.

Computing π: Ramanujan's Series in Action

Ramanujan's infinite series for 1/π, extended by the Chudnovsky brothers in 1987:

1/π = (1/426880√10005) × Σ [(−1)^n × (6n)! × (13591409 + 545140134n)] / [(3n)! × (n!)³ × 640320^(3n)]

Each term adds approximately 14 decimal digits of π.

This is the algorithm used by:

Ramanujan's 1914 formula now runs in data centers computing the most precisely known mathematical constant in history.

Signal Processing: Ramanujan Sums

The Ramanujan sum c_q(n) is defined as:

c_q(n) = Σ e^(2πi·k·n/q) summed over k coprime to q

Ramanujan showed these sums have the remarkable property that any arithmetic function can be expanded in terms of them — analogous to Fourier series but for arithmetic functions.

In 2014, P.P. Vaidyanathan (Caltech) applied Ramanujan sums to signal processing — specifically period detection in noisy signals. The "Ramanujan filter bank" detects periodic components in integer-period signals with superior performance to FFT methods for certain problem classes.

This is now applied in:

Number Theory in Competitive Programming

The Ramanujan prime R_n is the smallest integer such that:

π(x) − π(x/2) ≥ n for all x ≥ R_n

where π(x) is the prime counting function. The first few: R_1 = 2, R_2 = 11, R_3 = 17, R_4 = 29, R_5 = 41.

Ramanujan primes appear in competitive programming problems and primality-testing algorithms — another pure result finding unexpected computational use.

National Mathematics Day: India's Mathematical Heritage

Every December 22, India celebrates National Mathematics Day — a tribute to Srinivasa Ramanujan and a call to the nation to embrace mathematical thinking. The day was proclaimed by Prime Minister Manmohan Singh on Ramanujan's 125th birth anniversary in 2012, declaring mathematics not a dry academic subject but a living heritage and national priority.

Why is National Mathematics Day on 22 December?

The choice is deliberately personal. Unlike many science days that celebrate a discovery or concept, National Mathematics Day celebrates a person — and through him, a certain kind of mind.

Ramanujan represents something India wants to celebrate and replicate: the idea that mathematical genius can emerge from anywhere, from a clerk in Madras as readily as from a professor at Oxford, provided the flame of curiosity is lit and nurtured.

India's Mathematical Heritage Before Ramanujan

Ramanujan did not emerge from a vacuum. India has one of the world's oldest mathematical traditions:

Madhava's Kerala School in particular developed power series expansions for sine, cosine, and the arctangent (the Gregory-Leibniz series for π) in the 14th and 15th centuries — well before European mathematicians discovered the same results.

National Events and Programs

National Mathematics Day activities include:

Mathematical Olympiad preparation: The National Board for Higher Mathematics (NBHM) organizes training camps for students selected for the International Mathematical Olympiad (IMO). India's IMO performance has improved steadily — multiple gold medals in recent years.

Mathematics festivals: IISc, TIFR, Chennai Mathematical Institute (CMI), and IITs conduct open lectures, problem-solving contests, and public talks connecting mathematics to art, music, and science.

Vigyan Prasar outreach: Videos, podcasts, and school programs explain Ramanujan's work in accessible language — making partition theory and infinite series engaging for school students.

INSPIRE scholarships: The DST awards INSPIRE scholarships to exceptionally talented students in mathematics, supported by the National Mathematics Day visibility.

The Ramanujan Prize

The ICTP Ramanujan Prize for Young Mathematicians from Developing Countries (established 2005) is awarded annually by the International Centre for Theoretical Physics, funded by the Norwegian Academy of Science and the Abel Foundation. It specifically honors mathematicians under 45 from developing nations — explicitly invoking Ramanujan's story of genius emerging from circumstance.

Hardy's Contribution: Recognizing What Others Missed

It is worth dwelling on G.H. Hardy's role. He received many unsolicited letters claiming mathematical results. Most he discarded. Something made him pause over Ramanujan's.

Hardy later said that discovering Ramanujan was "the one romantic incident in my life." He rated Ramanujan's raw mathematical talent at 100 on a scale where he himself scored 25 and his distinguished colleague Littlewood scored 30. Only Euler and Jacobi, Hardy believed, had comparable natural gifts.

National Mathematics Day honors not just Ramanujan, but the act of recognition — the willingness to see genius in unexpected places and the institutional support needed to let it flourish.

The Ramanujan Institute and Chennai Mathematical Institute

Ramanujan's legacy is institutionalized in India's mathematical landscape:

The Ramanujan Institute for Advanced Study in Mathematics at the University of Madras — founded in 1950, now one of India's oldest mathematics departments.

Chennai Mathematical Institute (CMI) — founded in 1989, offering undergraduate and graduate programs in pure mathematics. Several of its alumni have made significant contributions to algebraic geometry, number theory, and combinatorics.

The SASTRA Ramanujan Prize (since 2005) is awarded to mathematicians under 32 — Ramanujan's age at death — for outstanding contributions to areas influenced by Ramanujan's work.

Ramanujan's Mathematics in the 21st Century

A century after his death, Ramanujan's notebooks continue to yield new mathematics. The "Lost Notebook" alone — 130 pages of formulas written in his final year — has occupied mathematicians for five decades. We are still mining it.

The Moonshine Conjectures and Monster Groups

One of the most extraordinary episodes in 20th century mathematics began with a coincidence noticed in 1978 by John McKay: the constant 196,884 appearing in the expansion of the j-function (a key modular form):

j(τ) = 1/q + 744 + 196884q + 21493760q² + ...

is equal to 196,883 + 1, where 196,883 is the dimension of the smallest non-trivial representation of the Monster Group — the largest sporadic finite simple group with roughly 8 × 10⁵³ elements.

This seemed like a wild coincidence. It was not. John Conway and Simon Norton conjectured in 1979 ("Monstrous Moonshine") that there is a deep connection between modular functions and the Monster Group. This was proven by Richard Borcherds in 1992 (Fields Medal 1998) using vertex operator algebras from string theory.

The machinery underlying Monstrous Moonshine is precisely the theory of modular forms that Ramanujan pioneered. His work on modular forms, developed intuitively in a colonial Indian context, turned out to be the language in which the largest finite symmetry group in existence speaks.

Ramanujan Graphs: Networks from Number Theory

In 1988, Alexander Lubotzky, Ralph Phillips, and Peter Sarnak constructed Ramanujan graphs — a family of regular graphs with optimal expansion properties.

Formally, a k-regular graph is a Ramanujan graph if all non-trivial eigenvalues λ of its adjacency matrix satisfy:

|λ| ≤ 2√(k−1)

This spectral bound (related to the Ramanujan-Petersson conjecture about coefficients of modular forms) is optimal — it is the Alon-Boppana bound. Ramanujan graphs are therefore the "best possible" expanders.

Applications:

The Birch and Swinnerton-Dyer Conjecture

One of the seven Millennium Prize Problems (each worth $1 million), the BSD conjecture concerns elliptic curves and their L-functions. It predicts a deep relationship between the algebraic structure of an elliptic curve and the analytic behavior of its associated L-function — a direct descendant of the Riemann zeta function that Ramanujan worked to understand.

The BSD conjecture remains unproven. Its resolution is expected to require advances in the theory of modular forms, mock modular forms (Ramanujan's mock theta functions), and p-adic analysis.

Automated Theorem Discovery: AI Meets Ramanujan

In 2021, researchers at the Technion (Israel Institute of Technology) created the Ramanujan Machine — an algorithm that automatically discovers new conjectures in the style of Ramanujan: continued fractions and infinite series for fundamental mathematical constants.

The machine has discovered previously unknown conjectures involving π, e, and the Catalan constant — formulas that no human mathematician had found. It operates using an analogy to Ramanujan's own method: exhaustive numerical exploration followed by pattern recognition, generating conjectures that mathematicians then must prove.

Ramanujan's Notebook Project

The ongoing Ramanujan's Notebooks project (led by Bruce Berndt at the University of Illinois) has now published five thick volumes fully proving every formula in Ramanujan's notebooks. The project began in 1974 and is not yet complete.

Many of the proofs required mathematics developed decades after Ramanujan's death:

Ramanujan wrote down the answers. The rest of mathematics spent 100 years building the roads that explain why.

Key Takeaways: Numbers, Infinity, and India's Mathematical Soul

Srinivasa Ramanujan lived for 32 years, spent much of his mathematical life in poverty and isolation, received no formal training in advanced mathematics, and produced work that mathematicians a century later are still fully understanding. This is either the most extraordinary coincidence in the history of science, or it is evidence of something profound about the nature of mathematical truth.

The Mathematics

Partition theory: Ramanujan and Hardy's asymptotic formula p(n) ≈ e^(π√(2n/3)) / (4n√3) predicted partition numbers with stunning accuracy, introducing the circle method that transformed analytic number theory.

Congruences: p(5k+4) ≡ 0 mod 5, p(7k+5) ≡ 0 mod 7 — observed empirically, explained only decades later using deep algebraic structure Ramanujan sensed but could not yet name.

Mock theta functions: Written in his last weeks of life, these functions were "explained" only in 2002 using harmonic Maass forms — and then found to compute the entropy of black holes in string theory.

Infinite series for π: Each term adds 8-14 decimal digits, forming the basis for 21st century world-record π computations.

1 + 2 + 3 + ... = −1/12: A divergent sum given finite meaning through analytic continuation — appearing in string theory and the Casimir effect.

The Cross-Disciplinary Reach

Pure number theory from a Port Trust clerk's notebooks now appears in:

The Human Story

Hardy said: "Ramanujan's failure was, in a way, more wonderful than any of his triumphs." He meant: given the obstacles — poverty, lack of training, colonial educational system, physical illness — the fact that Ramanujan produced anything of lasting value is extraordinary. That he produced mathematics of this caliber is without precedent.

National Mathematics Day does not merely celebrate a dead genius. It asks a living question: how many Ramanujans are out there right now, in circumstances that make it hard to be found, waiting for the equivalent of a Hardy to recognize them?

"I have not trodden through a conventional university course, but I am striking out a new path for myself." — Srinivasa Ramanujan, letter to Hardy, 1913

Every December 22, India answers: we are still looking.

Related stories

More from Number Ninjas

All stories from Number Ninjas