Archimedes’ Cattle Problem: The Ancient Puzzle with an Answer Too Large to Write Down
A Simple Herd with an Astonishing Answer
Archimedes’ Cattle Problem asks for the number of white, black, yellow, and dappled cattle belonging to the sun god Helios. Its first stage leads to a manageable answer of 50,389,082 cattle. Add two innocent-looking conditions, however, and the smallest solution explodes into a number containing 206,545 digits.
It is one of history’s finest examples of a puzzle whose rules are easy to understand but whose full answer is almost impossible to imagine.
Much like the Tower of Hanoi and its universe-spanning solution, the Cattle Problem demonstrates how a few simple mathematical rules can produce an enormous result.
Where Did the Cattle Problem Come From?
The puzzle is traditionally attributed to Archimedes, the great Greek mathematician who lived during the third century BCE. It survives as a 44-line Greek poem addressed to Eratosthenes and the mathematicians of Alexandria.
The poem describes the cattle of Helios, the sun god, grazing on the island of Thrinacia. The herd is divided in two ways:
- Bulls and cows
- White, black, yellow, and dappled animals
The text gives a series of relationships between these eight groups. Solvers must determine the smallest possible number of cattle satisfying every condition.
The surviving poem was brought to scholarly attention in 1773, when German writer and librarian Gotthold Ephraim Lessing found it in a Greek manuscript at the Herzog August Library in Wolfenbüttel. Its exact origin remains uncertain, so historians generally say that it is attributed to Archimedes rather than unquestionably written by him. The MacTutor history of the Archimedean Cattle Problem offers a detailed account of its mathematics and background.
The First Part: Turning Poetry into Equations
Beneath the mythical setting is a system of mathematical equations. For example, one condition says that the number of white bulls equals the number of yellow bulls plus one-half and one-third of the number of black bulls.
Using letters for the different groups, that statement becomes:
[ W = Y + \frac{1}{2}B + \frac{1}{3}B ]
or, more simply:
[ W = Y + \frac{5}{6}B ]
The poem gives similar relationships for the black, yellow, and dappled bulls. It then provides four more conditions connecting the cows with the total cattle of different colors.
This creates seven equations involving eight unknown quantities. That means the equations do not point to one fixed solution immediately. Instead, they describe an entire family of solutions. Because the problem asks for whole animals, every value must be a positive integer—there can be no fractional cow.
The smallest positive solution to this first stage is:
| Group | Number of cattle | |---|---:| | White bulls | 10,366,482 | | Black bulls | 7,460,514 | | Yellow bulls | 4,149,387 | | Dappled bulls | 7,358,060 | | White cows | 7,206,360 | | Black cows | 4,893,246 | | Yellow cows | 5,439,213 | | Dappled cows | 3,515,820 | | Total | 50,389,082 |
That is already an enormous herd, but it is still a perfectly ordinary eight-digit number. A modern calculator can handle it without difficulty, and the relationships can be solved using standard linear algebra. A worked computer solution confirms the total of 50,389,082 cattle.
This stage illustrates the hidden mathematics behind familiar puzzle games: translating a complicated description into a clear system of rules is often the most important step.
The Two Conditions That Change Everything
After presenting the first set of relationships, the poem raises the difficulty dramatically. To earn the highest praise, the solver must satisfy two additional requirements:
- The total number of white and black bulls must be a square number.
- The total number of yellow and dappled bulls must be a triangular number.
A square number can be arranged as a square. Examples include:
[ 1,\ 4,\ 9,\ 16,\ 25,\ 36 ]
A triangular number can be represented by objects arranged in rows of 1, 2, 3, and so on. The sequence begins:
[ 1,\ 3,\ 6,\ 10,\ 15,\ 21 ]
These conditions sound harmless. The solver already has a family of valid herds, so why not search through that family until the required totals become square and triangular?
That search is exactly where the numbers become monstrous. Most multiples satisfying the original ratios do not satisfy both extra conditions. The first multiplier that works is unimaginably large.
Why a Pell Equation Appears
When mathematicians simplify the two extra conditions, the problem eventually becomes connected to a Pell equation, a type of equation generally written as:
[ x^2-Dy^2=1 ]
Here, (D) is a positive integer that is not a perfect square, while (x) and (y) must be integers.
Pell equations look simple, but their smallest solutions can be surprisingly large. Continued fractions provide a systematic way to solve them, yet “systematic” does not mean “small.” Certain values of (D) force a long journey before the first suitable pair of integers appears.
In the Cattle Problem, the square and triangular requirements combine with the original ratios to select an enormous solution from the family created by the first seven equations. The mathematics is not relying on brute force alone; it reveals a repeating number-theoretic structure that can generate valid solutions.
The American Mathematical Society’s discussion of solving Pell equations uses Archimedes’ puzzle as a remarkable example of how elementary-looking equations can conceal gigantic answers.
How Large Is the Complete Answer?
The smallest total satisfying every condition is approximately:
[ 7.7602714064868 \times 10^{206544} ]
Because the number begins with 7 and is followed by 206,544 more places, it contains 206,545 decimal digits. The complete expansion begins:
77602714064868182695302328332138866642323224059233...
and ends:
...05994630144292500354883118973723406626719455081800
The full decimal expansion is recorded by the Online Encyclopedia of Integer Sequences.
For perspective:
- Writing one digit every second without stopping would take about 57 hours.
- At roughly 5,000 digits per printed page, the number would fill about 42 pages.
- It has vastly more digits than the estimated number of atoms in the observable universe has zeros.
- Merely naming each individual animal would be a far greater challenge than counting every person who has ever lived.
So is the answer literally too large to write down? Not with modern computers. It has been printed and stored electronically. However, it is far too large for normal calculation or practical handwritten presentation—especially by ancient mathematicians working without modern notation, logarithms, or computing machines.
The Long Road to a Complete Solution
In 1880, German mathematician August Amthor found the general method needed to solve the complete puzzle. Using logarithmic tables, he determined that the smallest answer would have 206,545 digits and calculated its approximate size.
Producing every digit was another matter.
That achievement arrived in 1965, when Hugh C. Williams, R. A. German, and Charles Robert Zarnke used computers at the University of Waterloo. Their calculation took 7 hours and 49 minutes, and the resulting number occupied 42 computer sheets. The researchers also analyzed its digits to help verify the result.
The puzzle therefore forms a remarkable bridge across history:
- Ancient poetry supplied the challenge.
- Nineteenth-century number theory revealed its structure.
- Twentieth-century computers produced the complete decimal answer.
What Makes the Cattle Problem So Special?
The Cattle Problem is memorable not simply because its answer is large. Anyone can invent a question involving an enormous number. What makes this puzzle extraordinary is that its colossal answer grows naturally from understandable conditions.
It also teaches several valuable lessons:
Simple rules can have extreme consequences
Each individual ratio is manageable. The square and triangular conditions are familiar ideas. Their combination, however, creates a problem of astonishing scale.
Finding a method matters more than printing the result
A 206,545-digit number is not very informative by itself. The true intellectual achievement is proving why it is the smallest valid answer and developing a method that generates it.
Computation and proof are different
A computer can calculate the digits, but mathematics must explain what to calculate. As explored in how puzzle designers prove that challenges are solvable, finding an answer is only part of the task; the reasoning must also show that the answer follows the rules.
An Ancient Puzzle with a Modern Message
Archimedes’ Cattle Problem begins as a poetic counting exercise about a colorful herd. It ends in linear equations, triangular numbers, square numbers, continued fractions, Pell equations, and one of the most spectacular numerical answers in recreational mathematics.
Its greatest surprise is the gap between question and answer. The rules fit comfortably on a page and can be explained to a young puzzle fan. The smallest complete solution requires 206,545 digits.
That contrast is why the puzzle still fascinates readers more than two thousand years after the time of Archimedes. It reminds us that mathematics can hide infinity-like complexity inside the simplest stories—even a story about counting cows.


