Happy number
In number theory, a happy number is a number which eventually reaches 1 when the number is replaced by the sum of the square of each digit. For instance, 13 is a happy number because 1 2 + 3 2 = 10 {\displaystyle 1^{2}+3^{2}=10} , and 1 2 + 0 2 = 1 {\displaystyle 1^{2}+0^{2}=1} .