The Archimedes Cattle Problem
The Archimedes Cattle Problem is a well known mathematical problem attributed to Archimedes. The problem, which is described both here and here, is interesting because it suggests a remarkable early insight into mathematics that was only fully developed many centuries later in the middle ages. In particular, it suggests that, while those who posed the problem could not give a solution, they were confident enough in the mathematics involved to know that a solution did exist. The problem, the history involved its solution and methods for it solution are reviewed in this paper by H.W. Lenstra Jr.
I thought it would be interesting to produce a solution in Python.