A number is happy if the sum of the squares of its digits are 1 or happy. A number is unhappy if the sum of the squares of its digits get caught in a loop. In base 10, the only unhappy loop is 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4. ;
0s1s Enter 'list' to get a list of happy numbers. Enter 'prime' to get a list of happy primes.