Michael Schneider shows how ancient Egyptians (and others) performed mathematics:
With this in mind, you can appreciate the Rhind Mathematical Papyrus and similar documents that contain a series of math puzzles for the edification of ancient Egyptians. The Rhind Papyrus contains a variation on the puzzle of sevens (“A man has seven wives, each wife has seven bags, each bag has seven cats …”), which is still used today to teach exponents.
Of course, in the ancient world there was always another level. Writing itself was a magical act of creation, and puzzle solving may have provided insight into the nature of the universe. The NYT quotes the author of the Rhind Papyrus, who claims that he provides the “correct method of reckoning, for grasping the meaning of things and knowing everything that is, obscurities and all secrets.”
Incidentally, the Rhind Papyrus sets the value of Pi at about 3.16, which is better than the Bible’s value of 3.