A problem of Ozanam. (Proceedings of the Edinburgh Mathematical Society, 2009)