Function Kata "Happy numbers"

Develop a function that recognizes whether a number is "happy" or not.

One Happy number is a number for which the sum of the squares of its digits equals 1 "in the long run". Example:

19 -> 1^2 + 9^2 = 82 -> 8^2 + 2^2 = 68 -> 6^2 + 8^2 = 100 -> 1^2 + 0^2 + 0^2 = 1

Variation #1

Find all the happy numbers in a number range, e.g. from 10 to 20.

en_USEnglish