Mathematics July 2026 12 min read
Why a Dying Genius Found 1729 a Beautiful Number
A cab number, a dying man, and an answer that arrived without a pause. What Ramanujan saw in 1729 opens a question mathematicians rarely say out loud—what makes one number beautiful, and another merely large?
The cab that carried G. H. Hardy out to Putney one grey afternoon near the end of the First World War bore the number 1729, and he noticed it the way you notice a coat button—idly, meaning nothing by it. He was on his way to a nursing home to sit with Srinivasa Ramanujan, the young Indian mathematician he had summoned to Cambridge four years earlier, and who was now dying by slow degrees of an illness no one could quite name. Small talk did not come easily to Hardy. So he offered the number the way one offers the weather: 1729, he said, seemed a rather dull one, and he hoped it was not a bad omen. From the bed came the reply, immediate and untroubled, as if Hardy had asked after an old acquaintance. No, Ramanujan said—it is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways.
Turn that over and you begin to see why it delighted him. One cubed is one; twelve cubed is one thousand seven hundred twenty-eight; add them and you land on 1729. Now start again from different bricks: nine cubed is seven hundred twenty-nine, ten cubed is one thousand, and they too sum to 1729. Two entirely separate pairs of cubes, sharing nothing, arriving at the same destination—1^3 + 12^3 = 9^3 + 10^3. Plenty of numbers can be written as a sum of two cubes. What makes 1729 special is that it is the very first number, counting up from nothing, that can be built that way twice over. Below it, every such sum is unique; at 1729, for the first time, the integers double back on themselves. Ramanujan had not calculated this at the bedside. He simply knew it, the way you know a friend’s face in a crowd.
A Friendship with the Integers
That knowing was the thing his colleagues could never fully account for. Ramanujan had grown up in Kumbakonam in southern India, largely self-taught, failing his college exams because he would study nothing but mathematics, filling notebook after notebook with results he said the goddess Namagiri set on his tongue in dreams. When he mailed a sheaf of these to Cambridge in 1913, most of the dons who glanced at them assumed a crank or a forger. Hardy could not dismiss them, because some of the formulas were so strange, he later wrote, that they had to be true—no one would possess the imagination to invent them. What Hardy had in rigor, Ramanujan had in something closer to acquaintance. His collaborator J. E. Littlewood, groping for a way to describe it, landed on the sentence that has trailed Ramanujan ever since.
“Every positive integer was one of his personal friends.”— J. E. Littlewood, of Ramanujan
Out of that bedside exchange the mathematicians coined a name. The nth taxicab number, written Ta(n), is the smallest whole number you can express as a sum of two positive cubes in n different ways. Ta(1) is a modest 2—just 1^3 + 1^3, the only way there is. Ta(2) is Ramanujan’s 1729. After that they bolt for the horizon: Ta(3) is 87,539,319, the smallest number that splits three ways, and Ta(4) climbs into the trillions. We have pinned down only the first six, and each fresh one costs an enormous computational hunt. Yet we know, and can prove, that Ta(n) exists for every n, however large—that somewhere up the number line there sits a smallest number wearing exactly a thousand disguises, and another wearing a million. The coincidence Ramanujan spotted from his sickbed was not a fluke. It was the second rung of a ladder with no top.
What Makes a Number Beautiful
It is worth being exact about what Ramanujan actually said. He did not call 1729 beautiful; he called it interesting. But in mathematics those two words sit closer together than they do anywhere else, and when mathematicians call a proof or a number beautiful, they are not decorating; they are naming a real and surprisingly specific set of virtues. Hardy, who thought about this harder than almost anyone, argued that a beautiful piece of mathematics carries three qualities at once: unexpectedness, inevitability, and economy. It surprises you—you did not see it coming. Then, a beat later, it convinces you so completely that it feels less invented than uncovered, as though it could not have been otherwise. And it does all this with almost nothing, a handful of symbols hauling an ocean of consequence. Add depth, the sense that the result reaches down and grips something structural, and you have most of the aesthetic. 1729 is only a small charmer. But it has the shape exactly: a surprise that, once seen, feels inevitable.
Beauty is not the decoration on a truth. Often it is the divining rod that finds it.
A Cabinet of Wonders
Once you have the eye for it, the integers and their kin turn out to be full of these small perfections, and no line in all of mathematics is more often called beautiful than Euler’s identity. It reads, in full, e^(i pi) + 1 = 0, and that single line is the whole of it. Into it Euler gathered the five most important constants in mathematics—e, the engine of growth; i, the impossible square root of minus one; pi, the ratio hiding inside every circle; and the plain 1 and 0 from which counting itself begins—and bound them with one quiet equals sign. These numbers arrive from utterly different countries: geometry, algebra, analysis, the raw act of tallying. There is no earthly reason they should have a word to say to one another. And yet, arranged just so, they cancel to nothing, exactly. In a famous reader poll run by the Mathematical Intelligencer, this was voted the most beautiful theorem in mathematics, and Feynman called its parent formula the most remarkable in all the field.
Beauty of a different flavor lives in the golden ratio, the number mathematicians call phi, which runs 1.618 and onward forever without repeating. Phi is defined by an act of self-reference so clean it feels like a riddle: it is the number whose square is simply itself plus one, phi^2 = phi + 1. Put another way, phi equals one plus its own reciprocal—a number that holds a smaller copy of itself, which holds a smaller copy, without end. Chase that nesting in whole numbers and you meet the Fibonacci sequence, where each term is the sum of the two before it: 1, 1, 2, 3, 5, 8, 13, 21, 34. Divide any term by the one beneath it—34 over 21, say—and you get a value creeping ever nearer to phi. Count and ratio, the discrete and the continuous, turn out to be two faces of a single object. And that object, as it happens, is also the one a sunflower uses to arrange its seeds.
This is not numerology; it is engineering. A plant growing from its tip sets down each new seed, leaf, or floret at a fixed angle from the last. If that angle divides the circle evenly, the parts line up in spokes and leave wasteful gaps. The one angle that never repeats, that keeps every new element dropping into the largest space still open, is the circle split according to phi—roughly 137.5 degrees, the golden angle. A sunflower turning by exactly that much crams the most seeds into its head, and the visible result is those interlocking spirals you can sit and count: 21 running one way and 34 the other, or 34 and 55, always neighbors on the Fibonacci line. The pinecone does it, the pineapple does it, the nautilus comes close. The plant is not solving an equation. It is only growing—and the most efficient growth and the most beautiful number turn out, astonishingly, to be the same thing.
Older than any of these, and holy to the Greeks, are the perfect numbers—the integers that equal the sum of their own divisors. Take 6: the numbers that divide it, short of itself, are 1, 2, and 3, and 1 + 2 + 3 comes to 6 exactly. The next is 28, which is 1 + 2 + 4 + 7 + 14. Then a long jump to 496, and another to 8,128. The ancients found these four and sensed something sacred in them; Augustine argued that God made the world in six days because six is perfect, not the other way round. Euclid, around 300 BCE, proved a gorgeous rule for minting them, and two thousand years later Euler proved that his rule catches every even one: each such number is bound, precisely, to a rare prime of the form 2^p - 1, a Mersenne prime. Find a new Mersenne prime and you have found a new perfect number for free. We have turned up only about fifty in all of recorded history. And whether a single odd perfect number exists, anywhere in the endless integers, no one on Earth has ever been able to say.
The Numbers That Do Tricks
Some numbers are beautiful the way a theorem is; others are beautiful the way a card trick is, and the finest of these is 6,174. Pick any four-digit number, so long as its digits are not all identical—your PIN, a year, 2026. Arrange its digits into the largest number you can, then into the smallest, and subtract. Now do the very same thing to the answer. And again. In at most seven steps, every number you could possibly begin with—every single one—collapses onto 6,174 and stops there, because 7641 minus 1467 is 6,174 once more, and so on forever. The Indian mathematician D. R. Kaprekar found this fixed point in 1949, and there is still no illuminating reason known for why four digits should behave so obediently; three digits fall instead to 495, and most other lengths fall to nothing so tidy. It is a small, self-contained miracle—the number-theory equivalent of a whirlpool that draws every leaf on the river to the same still point.
Stranger still is 142857, a number most of us have met without noticing, because it is what spills out of one divided by seven: 0.142857142857, repeating without end. Watch what it does under multiplication. Two times 142857 is 285714—the same six digits, merely rotated. Three times is 428571; four times, 571428; five times, 714285; six times, 857142. Every product is the original wearing its digits in a new starting place, as though the number were mounted on a wheel. And seven times 142857? That breaks the spell and gives 999999, a clean row of nines, the wheel snapping shut. Mathematicians call it a cyclic number, and it springs from a special quality of the prime 7 in our base-ten world—what they call a full reptend prime, a prime whose reciprocal takes the longest possible run of digits before it loops. There is a particular joy in it, hard to argue anyone into, that has nothing to do with use. The digits simply turn in a circle, and something in us that loves circles is satisfied.
The Vast, and the Limit
Beauty in mathematics is not always small and neat; sometimes it is monstrous. Consider Graham’s number, which surfaced in the 1970s as an upper bound in a problem about the lines drawn between the corners of a many-dimensional cube. It is so large that ordinary notation simply gives out—you cannot reach it with exponents stacked to the ceiling; it needs a special arrow notation merely to be written down, and if every digit were printed in the smallest space physics allows, the whole observable universe could not hold them. For years it held the record as the largest number ever used in a serious proof. And then it turns out Graham’s number is practically nothing beside TREE(3), a quantity that falls out of an innocent puzzle about drawing trees and makes Graham’s look like something you could count on one hand. Both are finite. That is the vertigo of it: not infinity, which is a different order of idea, but a definite, exact, finite quantity so vast the mind falls off the edge of it and keeps on falling.
Here honesty requires a step back, because it would be easy to leave you with a fairy tale. Not all mathematics is beautiful, and pretending otherwise does the field a disservice. Vast tracts of it are grinding, ungainly, and indispensable. The proof of the four-color theorem came down to a computer checking roughly two thousand cases by brute force, a result nobody finds lovely and everybody accepts. The classification of the finite simple groups runs to tens of thousands of pages across hundreds of papers, a cathedral no single mind can hold in view at once. And beauty, worse, can lie: an elegant conjecture can be flatly false, and the history of the subject is littered with pretty ideas that turned out wrong. The seduction of a clean formula is exactly the sort of thing that ought to make a careful thinker wary. Beauty is not truth. It is not even a dependable guide to truth. It is something we feel, and the numbers themselves feel nothing back. And yet Hardy, who knew all of this, refused to give the ugliness the last word.
“There is no permanent place in the world for ugly mathematics.”— G. H. Hardy, A Mathematician’s Apology
He may have been right, though not quite as a fact about mathematics—more as a confession of what pulls us toward it. We are pattern-hungry creatures set loose in a world that mostly refuses to resolve, and a beautiful theorem offers the rarest thing our days afford: a piece of order that is complete, and true, and will never change its mind. The chord a piano plays is a compromise. The flood myth is a story we tell to survive the water. But 1^3 + 12^3 will equal 9^3 + 10^3 in every language, on every world, for as long as there is anyone left to do the adding. That permanence is the quiet consolation under the arithmetic. Ramanujan has been gone for more than a century; the illness took him at thirty-two, still writing formulas in the last weeks of his life. But the friendship he kept with the integers did not die with him. It is still there, folded into the numbers, waiting for anyone patient enough to look. He only saw at once what the rest of us must be shown—that 1729 was never dull. It was a friend in plain sight, waiting to be known.