It is somewhat complicated; so I want to point out to the Wikipedia article that explains it: http://en.wikipedia.org/wiki/Happy_numberThe origin of the name "happy" is not explained there, it seems;...
A number is prime if is has exactly two unique positive factors, the number 1 and itself. E.g. 5, 7 and 11 are all prime numbers. The number 1 is not prime. However, 15, for example, is not prime...