Here's one reference for you;
http://www.luckymojo.com/number7.html
and the quote; "Finally it postulates that the "St. Ives" problem (As I was going to St. Ives, I met a man with seven wives. Every wife had seven sacks, etc) dates back over 3500 years, and can be traced to an Egyptian scribe. (This theory can be traced back, possibly more reliably, to one R. J. Gillingham, "Mathematics in the Time of the Pharaohs," MIT Press, 1972.)" ,
If you want more you'll find plenty by googling.