Happy Number

A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers, while those that do not end in 1 are unhappy numbers (or sad numbers).

Read more about Happy Number:  Overview, Sequence Behavior, Happy Primes, Special Happy Numbers, Happy Numbers in Other Bases, Cubing The Digits Rather Than Squaring, Origin, Popular Culture, Programming Example

Famous quotes containing the words happy and/or number:

    This happy breed of men, this little world,
    This precious stone set in the silver sea,
    Which serves it in the office of a wall,
    Or as a moat defensive to a house,
    Against the envy of less happier lands,
    This blessed plot, this earth, this realm, this England.
    William Shakespeare (1564–1616)

    Cultivated labor drives out brute labor. An infinite number of shrewd men, in infinite years, have arrived at certain best and shortest ways of doing, and this accumulated skill in arts, cultures, harvestings, curings, manufactures, navigations, exchanges, constitutes the worth of our world to-day.
    Ralph Waldo Emerson (1803–1882)