Happy number
Numbers with a certain property involving recursive summation / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Happy prime?
Summarize this article for a 10 year old
In number theory, a happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit. For instance, 13 is a happy number because , and . On the other hand, 4 is not a happy number because the sequence starting with and eventually reaches , the number that started the sequence, and so the process continues in an infinite cycle without ever reaching 1. A number which is not happy is called sad or unhappy.
More generally, a -happy number is a natural number in a given number base that eventually reaches 1 when iterated over the perfect digital invariant function for .[1]
The origin of happy numbers is not clear. Happy numbers were brought to the attention of Reg Allenby (a British author and senior lecturer in pure mathematics at Leeds University) by his daughter, who had learned of them at school. However, they "may have originated in Russia" (Guy 2004:§E34).