happy number Algorithm

Happy numbers were bring to the attention of Reg Allenby (a British writer and senior lecturer in pure mathematics at Leeds University) by his daughter, who had learned of them at school. The origin of happy numbers is not clear.

happy number source code, pseudocode and analysis