Archimedes' cattle problem, also called the bovinum problema, or Archimedes' reverse, is stated as follows: "The sun god had a herd of cattle consisting of bulls and cows, one part of which was white, a second black, a third spotted, and a fourth brown. Among the bulls, the number of white ones was one half plus one third the number of the black greater than the brown; the number of the black, one quarter plus one fifth the number of the spotted greater than the brown; the number of the spotted, one sixth and one seventh the number of the white greater than the brown. Among the cows, the number of white ones was one third plus one quarter of the total black cattle; the number of the black, one quarter plus one fifth the total of the spotted cattle; the number of spotted, one fifth plus one sixth the total of the brown cattle; the number of the brown, one sixth plus one seventh the total of the white cattle. What was the composition of the herd?"
Solution consists of solving the simultaneous Diophantine equations in integers , , , (the number of white, black, spotted, and brown bulls) and
,
,
,
(the number of white, black, spotted, and brown cows),
A more complicated version of the problem requires that be a square number and
a triangular number. The solutions to this problem are numbers with 206544 or 206545 digits, which
was first obtained by Williams et al. (1965). Their calculations required
7 hours and 49 minutes of computing time, and the results were deposited in the Unpublished
Mathematical Tables file of the Mathematics of Computation journal. Nelson
(1980-81) published the 47-page printout from a CRAY 1 computer containing the -digit
solution. These computations, together with checking, took about ten minutes. In
addition to the smallest solution, five additional solutions were found to further
test the computer, with the largest containing more than one million digits (Rorres).
More recently, Vardi (1998) developed simple explicit formulas to generate solutions
to the cattle problem. In fact, the solution can (almost) be done out of the box
in the Wolfram Language using FindInstance.
The total number of cattle is then given by