🐂 Archimedes' Cattle Problem

From Modest Riddle to Astronomical Numbers

The Challenge

"If thou art diligent and wise, O stranger, compute the number of cattle of the Sun, who once upon a time grazed on the fields of the Thrinacian isle of Sicily..."

The Legend

Archimedes sent this problem as a challenge to mathematicians in Alexandria around 250 BCE. The riddle describes the cattle of Helios (the Sun god) in four colors—white, black, yellow, and dappled—with bulls and cows of each color. A series of linear relationships connects the herd sizes. Part I has a tractable solution with millions of cattle, but the "full" problem adds two square-number constraints that catapult the answer into a Pell equation with a minimal solution having over 206,000 digits!

The Mathematics

Part I (Linear System):
Seven equations in eight unknowns (W, B, Y, D for bulls; w, b, y, d for cows). Example:
• W = (1/2 + 1/3)B + Y
• B = (1/4 + 1/5)D + Y
• ...(and more)
The minimal integer solution: Total ≈ 50,389,082 cattle.

Part II (Pell Escalation):
Two additional constraints:
• W + B must be a perfect square
• Y + D must be a triangular number (n(n+1)/2)
These conditions transform the problem into solving a Pell-like equation x² - 4,729,494y² = 1, whose fundamental solution has hundreds of thousands of digits. The smallest herd satisfying all constraints has ~2.06 × 10^{206544} cattle—more than atoms in the observable universe!