Mathwords logoMathwords

Hardy-Ramanujan Number (1729) — Definition, Formula & Examples

The Hardy-Ramanujan number is 1729, famous for being the smallest positive integer that can be expressed as the sum of two positive cubes in two distinct ways. It arose from a conversation between mathematicians G.H. Hardy and Srinivasa Ramanujan, making it one of the most celebrated numbers in recreational mathematics.

The integer 1729 is the smallest positive integer nn such that n=a3+b3=c3+d3n = a^3 + b^3 = c^3 + d^3 for two distinct pairs of positive integers (a,b)(a, b) and (c,d)(c, d). Specifically, 1729=13+123=93+1031729 = 1^3 + 12^3 = 9^3 + 10^3. It is also called the first taxicab number, denoted Ta(2)\text{Ta}(2).

Key Formula

1729=13+123=93+1031729 = 1^3 + 12^3 = 9^3 + 10^3
Where:
  • 131^3 = First cube in the first pair (equals 1)
  • 12312^3 = Second cube in the first pair (equals 1728)
  • 939^3 = First cube in the second pair (equals 729)
  • 10310^3 = Second cube in the second pair (equals 1000)

How It Works

The story goes that Hardy visited Ramanujan in the hospital and remarked that his taxi had the rather dull number 1729. Ramanujan instantly replied that it was actually quite interesting — it is the smallest number expressible as the sum of two cubes in two different ways. To verify this property, you check that 13+123=1+1728=17291^3 + 12^3 = 1 + 1728 = 1729 and 93+103=729+1000=17299^3 + 10^3 = 729 + 1000 = 1729. No smaller positive integer has two such representations. This concept generalizes: Ta(n)\text{Ta}(n) is the smallest number expressible as the sum of two positive cubes in nn distinct ways.

Worked Example

Problem: Verify that 1729 is expressible as the sum of two positive cubes in exactly two distinct ways.
First pair: Compute the cubes of 1 and 12, then add them.
13+123=1+1728=17291^3 + 12^3 = 1 + 1728 = 1729
Second pair: Compute the cubes of 9 and 10, then add them.
93+103=729+1000=17299^3 + 10^3 = 729 + 1000 = 1729
Uniqueness check: No other pair of positive integers has cubes summing to 1729, and no positive integer smaller than 1729 has even two such pairs.
Answer: 1729 equals 13+1231^3 + 12^3 and 93+1039^3 + 10^3, confirming it is the smallest taxicab number Ta(2)\text{Ta}(2).

Why It Matters

The Hardy-Ramanujan number appears in number theory courses when studying Diophantine equations and representations of integers as sums of powers. It also illustrates how properties of numbers that seem obscure can connect to deep mathematical questions, such as those explored by Ramanujan in partition theory and modular forms.

Common Mistakes

Mistake: Thinking 1729 is the only taxicab number.
Correction: 1729 is specifically Ta(2)\text{Ta}(2), the smallest number with two cube-sum representations. Higher taxicab numbers exist: for instance, Ta(3)=87,539,319\text{Ta}(3) = 87{,}539{,}319 can be written as a sum of two cubes in three distinct ways.