Enter a positive integer.

Output will be shown here

Happy number.

A happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit.

Some happy numbers: 1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100.

Source: https://en.m.wikipedia.org/wiki/Happy_number

Related: Squared digit sum