Question 1046020
Squares end in 0, 1, 4, 5, 6, or 9.
To add up to 1 (or 10, or 100), only a few combinations work.
For a 2-digit numbers, you need to pair
0 with 1,
or 1 with 3, or
6 with 8.
Obviously {{{1}}} is a happy number, and so are {{{10}}} , and {{{100}}} .
Other happy numbers are
{{{13}}} , {{{31}}} , {{{68}}} and {{{86}}} .
The least unhappy number is {{{highlight(2)}}} .
{{{2^2=4}}}
{{{4^2=16}}}
{{{1^2+6^2=1+36=37}}}
{{{3^2+7^2=9+49=58}}}
{{{5^2+8^2=25+64=89}}}
{{{8^2+9^2=64+81=145}}}
{{{1^2+4^2+5^2=1+16+25=42}}}
{{{4^2+2^2=16+4=20}}}
2^2+0^2=4}}} and we went full loop back to {{{4}}} .
That also tells us that as soon as we found a number, or a sum of squares that is
{{{4}}} , or {{{16}}} , or {{{37}}} , or {{{58}}} , or {{{89}}} , or {{{145}}} , or {{{42}}} , or {{{20}}} ,
we know we have entered the loop above,
meaning that the original number is an unhappy number,
and so are all the other intermediate results.
Numbers with the same digits in a different order, are also unhappy,
because they will yield the same sum of squares.
The least prime that is a happy number is obviously not {{{2}}}.
It is not {{{3}}} either, because
{{{3^2=9}}}
{{{9^2=81}}}
{{{8^2+1^2=64+1=65}}}
{{{6^2+5^2=36+25=61}}} and {{{61}}} is as unhappy as {{{16}}} ,
bringing us into the same -->37-->58-->89--->145... unhappy loop we found for {{{2]}} .
The next prime, {{{5}}} , is also unhappy:
{{{5^2=25}}}
{{{2^2+5^2=4+25=29}}}
{{{2^2+9^2=4+81=85}}} , and {{{85}}} , as unhappy as {{{58}}} brings us back into the 
--->89--->145 ... loop we knew from {{{2}}} .
The next prime is happy number {{{highlight(7)}}} :
{{{7^2=49}}}
{{{4^2+9^2=16+81=97}}}
{{{9^2+7^2=81+49=130}}} , and as
{{{1^2+3^2+0^2=1+9+0=10}}} is happy, making
{{{1^2+0^2=1+0=1}}} , {{{highlight(7)}}} is the least happy prime number.From the sums above,m we see that {{{49}}} and {{{97}}} are also happy numbers.
Obviously {{{10}}} is a number greater than {{{1}}} ,
than when multiplied by any happy number gives a product with the same digits as the original number plus a zero added at the end,
so the product is also a happy number.
If there were a smaller factor whose products times a all happy numbers were happy, it would be a happy single digit number itself (as a product time happy {{{1}}} .
However, all digits other than {{{0}}} and {{{7}}} are unhappy, and while {{{7*7=49}}} is happy {{{7*49=343}}} is not:
{{{3^2+4^2+3^2=9+16+9=34}}}
{{{3^2+4^2=9+16=25}}} , and we knew that {{{25}}} is unhappy from testing {{{5}}} .
So, I think the least nteger greater than 1 that, when multiplied by any happy number, yields another happy number is {{{highlight(10)}}} .