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
12+32=10
12+02=1
On the other hand, 4 is not a happy number because the sequence starting with
42=16
12+62=37
32+72=58
52+82=89
82+92=145
12+42+52=42
42+22=20
22+02=4
This is 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.
These are happy numbers that are themselves the sum of happy numbers. So 23 is a Sum Happy Number because 23 -> 13 -> 10 -> 1 and 23 = 13 + 10, which are both happy numbers.
Theorem: There are infinitely many sum happy numbers
Proof: We will look at the numbers of the form 10k for k \geq 2. We see that 102 = 100, and 100 = 32 + 68. 100 -> 1, so 100 is a happy number. 32 -> 13 -> 10 -> 1,
so 32 is a happy number. 68 -> 100 -> 1, so 68 is a happy number. Further we see that 10k = 32 * 10k-1 + 68 * 10k-1. This will give us two numbers that
have as unique digits {3, 2, 0} and {6, 8, 0}. Because 02 = 0, it will not change the sum as it is added to the terms. So we only need to check if 32 and 68 are happy numbers,
which we have already shown to be true. This gives us an infinite list of sum happy numbers.