A happy number is one for which iterating the sum of squares of its decimal digits eventually reaches 1. Numbers that don't are unhappy — they fall into the cycle \(4 \to 16 \to 37 \to 58 \to 89 \to 145 \to 42 \to 20 \to 4\) and repeat forever.
Example: \(19 \to 1^2 + 9^2 = 82 \to 8^2 + 2^2 = 68 \to 6^2 + 8^2 = 100 \to 1\). So 19 is happy.
Happy primes are primes that are also happy. The first are 7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193. Like other digit-based properties, happiness is base-dependent.