Is there any proof that there are only 3 so-called "neon numbers"?

The phrase "neon number" is sometimes used for a number where: square the number, add the digits of that in base 10, and you get the original number.

So, 9 is a neon number (-> 81, 8+1, 9)

Indeed it is usually said there are only three neon numbers (0, 1, and 9).

Surprisingly I couldn't google any proof of this. (All the numbers up to a few billion have been trivially tested.)

Is there a proof?

And angularly, are "neon numbers" of any value or interest at all, or is it just a quirky thing?


Solution 1:

Suppose a number $m$ has $n$ digits. Then $m^2$ has atmost $2n$ digits.
The sum of digits of $m^2$ is at most $9\times 2n=18n$.
If the sum of digits of $m^2$ is equal to $m$ then $10^{n-1}\le m\le18n$.
This only true if $n<3$, so only single digit and double digit numbers can possibly be neon numbers.


You can prove using modular arithmetic that only numbers of the form $9k$ and $9k+1$ can be neon numbers. This reduces the number of positive integers that we have to check.


EDIT
Like @JBentley pointed out in the comments $0$ has to be considered separately because the inequality $10^{n-1}\le m$ does not hold.