Author David Reimer on how addition, subtraction, and multiplication problems were solved in the time of the pharaohs