Every natural number is either 'happy' or 'unhappy' (a trivial name for an interesting property), determined by the following test:

Let d_{k}, d_{k-1}, ... , d_{2}, d_{1}, d_{0} be the decimal digits of a number n=s_{0}. Let s_{1} = d_{k}^{2} + d_{k-1}^{2} + ... + d_{1}^{2} + d_{0}^{2}, the **sum of the squares of the digits of s**_{0}. Similarly, let s_{2} be the sum of the squares of the digits of s_{1}, and so on. If there exists an i>1 such that s_{i}=1, then n=s_{0}, s_{1}, ..., and s_{i-1} are said to be happy numbers. Otherwise, for all i>0, s_{i} is said to be an unhappy number. Further, all permutations on the digits of s_{i} are just as happy or unhappy as s_{i}, since addition is commutative.

For example, 28 is happy because 2^{2}+8^{2}=4+64=68, 6^{2}+8^{2}=36+64=100, and 1^{2}+0^{2}+0^{2}=1+0+0=1. The first several happy numbers are 1, 7, 10, 13, 19, 23, 28, ... It is unfortunate that my favorite number, 4, is unhappy. =(

So far, the 'happiness' property of a number is merely interesting, relating only to digital invariance.

*Information gleaned from *__http://mathworld.wolfram.com/HappyNumber.html__.