If we start from a number and we repeatedly apply , we obtain a sequence of numbers , , , and so on.
A number is called happy if contains the number 1.
Note that , so in that case the sequence has an infinite tail of 's.
If a number is not happy then it is easy to see that at a certain point will enter the infinite loop
On the contrary, starting from 61 we obtain and thus 61 is not happy, since 89 belongs to the unhappy loop.
The first -tuple of consecutive happy numbers, for starts at 31, 1880, 7839, and 44488, respectively.
E. El-Sedy & S. Siksek proved that there can be runs of arbitrary length.
The smallest 3 × 3 magic square whose entries are happy numbers is