Why does a sequence of unhappy numbers always loop back to itself? Given a positive integer $19$, it is said to be happy, because $1^2 + 9^2 = 82$, $8^2+2^2 = 68$, $6^2 + 8^2 = 100$, $1^2 + 0^2 + 0^2 = 1$. At each step we simply sum the square of all its digits, and if at some step the sum is equal to $1$, then we say this number is happy, otherwise unhappy. It is true that for an unhappy number $n$, it will always loop back to itself. Why is this true?

This is untrue.  $2$ is unhappy and does not loop back to itself: $$2\to4\to16\to37\to58\to89\to145\to42\to20\to4$$
