From http://www.math.nyu.edu/~crorres/Archimedes/Cattle/Statement.html A PROBLEM which Archimedes solved in epigrams, and which he communicated to students of such matters at Alexandria in a letter to Eratosthenes of Cyrene. 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, divided into four herds of different colours, one milk white, another a glossy black, a third yellow and the last dappled. In each herd were bulls, mighty in number according to these proportions: Understand, stranger, that the white bulls were equal to a half and a third of the black together with the whole of the yellow, while the black were equal to the fourth part of the dappled and a fifth, together with, once more, The cattle of the Sun depicted on a the whole of the yellow. Observe further that the remaining bulls, the dappled, were equal to a sixth part 6th-century BC vase from Cerveteri (Musée du Louvre, Paris). of the white and a seventh, together with all of the yellow. These were the proportions of the cows: The white were precisely equal to the third part and a fourth of the whole herd of the black; while the black were equal to the fourth part once more of the dappled and with it a fifth part, when all, including the bulls, went to pasture together. Now the dappled in four parts were equal in number to a fifth part and a sixth of the yellow herd. Finally the yellow were in number equal to a sixth part and a seventh of the white herd. If thou canst accurately tell, O stranger, the number of cattle of the Sun, giving separately the number of well-fed bulls and again the number of females according to each colour, thou wouldst not be called unskilled or ignorant of numbers, but not yet shalt thou be numbered among the wise. But come, understand also all these conditions regarding the cattle of the Sun. When the white bulls mingled their number with the black, they stood firm, equal in depth and breadth, and the plains of Thrinacia, stretching far in all ways, were filled with their multitude. Again, when the yellow and the dappled bulls were gathered into one herd they stood in such a manner that their number, beginning from one, grew slowly greater till it completed a triangular figure, there being no bulls of other colours in their midst nor none of them lacking. If thou art able, O stranger, to find out all these things and gather them together in your mind, giving all the relations, thou shalt depart crowned with glory and knowing that thou hast been adjudged perfect in this species of wisdom. …. The First Part of the Cattle Problem Let W = number of white bulls B = number of black bulls Y = number of yellow bulls D = number of dappled bulls w = number of white cows b = number of black cows y = number of yellow cows d = number of dappled cows Then the first part of the problem can be stated as the following seven equations in eight unknowns: (1) W = (1/2 + 1/3)B + Y (2) B = (1/4 + 1/5)D + Y (3) D = (1/6 + 1/7)W + Y (4) w = (1/3 + 1/4)(B + b) (5) b = (1/4 + 1/5)(D + d) (6) d = (1/5 + 1/6)(Y + y) (7) y = (1/6 + 1/7)(W + w) (the white bulls were equal to a half and a third of the black [bulls] together with the whole of the yellow [bulls]) (the black [bulls] were equal to the fourth part of the dappled [bulls] and a fifth, together with, once more, the whole of the yellow [bulls]) (the remaining bulls, the dappled, were equal to a sixth part of the white [bulls] and a seventh, together with all of the yellow [bulls]) (The white [cows] were precisely equal to the third part and a fourth of the whole herd of the black) (the black [cows] were equal to the fourth part once more of the dappled and with it a fifth part, when all, including the bulls, went to pasture together) (the dappled [cows] in four parts [i.e., in totality] were equal in number to a fifth part and a sixth of the yellow herd) (the yellow [cows] were in number equal to a sixth part and a seventh of the white herd) Equations (1-7) constitute a homogeneous linear system for W, B, Y, D, w, b, y, d with the following 7 x 8 coefficient matrix: 6 -5 -6 0 0 0 0 0 0 20 -20 -9 0 0 0 0 -13 0 -42 42 0 0 0 0 0 -7 0 0 12 -7 0 0 0 0 0 -9 0 20 0 -9 0 0 -11 0 0 0 -11 30 -13 0 0 0 -13 0 42 0 Using a symbolic algebra program (Maple©, MatLab©, Mathematica©, etc.) it is easily determined that this matrix has rank seven and a one-dimensional nullspace given by W B Y D w b y d = 10,366,482k = 7,460,514k = 4,149,387k = 7,358,060k = 7,206,360k = 4,893,246k = 5,439,213k = 3,515,820k where k is an arbitrary number and where the integers multiplying k have no common divisor. There are thus infinitely many possible positive integer solutions, corresponding to k = 1, 2, 3, ... . The smallest positive integer solution arises when k = 1, and so is W = 10,366,482 = number of white bulls B = 7,460,514 = number of black bulls Y = 4,149,387 = number of yellow bulls D = 7,358,060 = number of dappled bulls w = 7,206,360 = number of white cows b = 4,893,246 = number of black cows y = 5,439,213 = number of yellow cows d = 3,515,820 = number of dappled cows and the total number of cattle of the Sun is 50,389,082. If you could have gotten this far, then you "wouldst not be called unskilled or ignorant of numbers, but not yet shalt thou be numbered among the wise". Only by solving the second part of the problem can you be numbered among the wise. … The second part of the cattle problem imposes two additional conditions that restrict the possible values of k beyond k = 1, 2, 3, ... . The first additional condition states When the while bulls mingled their number with the black, they stood firm, equal in depth and breadth ... The most direct interpretation of this condition is that W + B = a square number …. The second additional condition, which further restricts the allowable value of k, states ... when the yellow and the dappled bulls were gathered into one herd they stood in such a manner that their number, beginning from one, grew slowly greater till it completed a triangular figure ... This means that Y + D = a triangular number where triangular numbers are numbers of the form 1 + 2 + 3 + 4 + 5 + . . . + m where m is some positive integer. By using the formula for the sum of the first m integers, we can also characterize triangular numbers as those numbers of the form m(m + 1)/2 where m is some positive integer. At this point we have …. 102,571,605,819,606r2 = m(m + 1) The problem now is to find positive integers r and m that satisfy this last equation.