## Happy Numbers

A happy number or unhappy number may be determined by the following process:

1) Beginning with any positive integer, replace the number by the sum of the squares of its digits,

2) Repeat the process until the number equals one (where it will remain) or it loops endlessly in a cycle which does not include one.

Those numbers for which this process ends in one are happy numbers, while those that do not end in one are unhappy numbers.

Various happy numbers include:

- 1
- 7
- 10
- 13
- 19
- 23
- 28
- 31
- 32
- 44

Happy Primes:

A happy number of a prime is referred to as a happy prime. Various happy primes include:

- 7
- 13
- 19
- 23
- 31
- 79
- 97
- 103
- 109

Example:

Solution:

7

4

9

1

1

Since process terminated with one and 7 is both prime and happy, it follows that the number is a happy prime.

Show 7 is a happy prime.

Solution:

7

^{2}= 49

4

^{2}+ 9

^{2}= 97

9

^{2}+ 7

^{2}= 130

1

^{2}+ 3

^{2}+ 0

^{2}= 10

1

^{2}+ 0

^{2}= 1

^{}

Since process terminated with one and 7 is both prime and happy, it follows that the number is a happy prime.