info prev up next book cdrom email home

Happy Number

Let the sum of the Squares of the Digits of a Positive Integer $s_0$ be represented by $s_1$. In a similar way, let the sum of the Squares of the Digits of $s_1$ be represented by $s_2$, and so on. If $s_i = 1$ for some $i\geq 1$, then the original Integer $s_0$ is said to be happy.

Once it is known whether a number is happy (or not), then any number in the sequence $s_1$, $s_2$, $s_3$, ... will also be happy (or not). A number which is not happy is called Unhappy. Unhappy numbers have Eventually Periodic sequences of $s_i$ which do not reach 1 (e.g., 4, 16, 37, 58, 89, 145, 42, 20, 4, ...).

Any Permutation of the Digits of an Unhappy or happy number must also be unhappy or happy. This follows from the fact that Addition is Commutative. The first few happy numbers are 1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, ... (Sloane's A007770). These are also the numbers whose 2-Recurring Digital Invariant sequences have period 1.

See also Kaprekar Number, Recurring Digital Invariant , Unhappy Number


Dudeney, H. E. Problem 143 in 536 Puzzles & Curious Problems. New York: Scribner, pp. 43 and 258-259, 1967.

Guy, R. K. ``Happy Numbers.'' §E34 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 234-235, 1994.

Madachy, J. S. Madachy's Mathematical Recreations. New York: Dover, pp. 163-165, 1979.

Schwartzman, S. The Words of Mathematics: An Etymological Dictionary of Mathematical Terms Used in English. Washington, DC: Math. Assoc. Amer., 1994.

Sloane, N. J. A. Sequence A007770 in ``The On-Line Version of the Encyclopedia of Integer Sequences.''

info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein