2019 OIM Problems/Problem 1
Problem
For each positive integer , let
be the sum of the squares of the digits of
. For example,
. Find all integers
such that
.
~translated into English by Tomas Diaz. ~orders@tomasdiaz.com
Solution
Notice that if has
digits, then
(by setting
). Using this, we can easily show that the only possible values of
are
since any greater would cause
, so the maximum value of
will always be less than the least possible value of
; thus
.\\
Thus, we attempt casework on . The case
is trivial; only
is a solution. Next, for
, we can show that the tens digit must always be even by considering parity of the ones digit versus parity of
. Then, we can perform casework on the tens digit, which results in no solutions for this case.
Finally, we consider . The maximum of
here is
, so we can divide our work down. If the hundreds digit is
, then the maximum becomes
, so the hundreds digit must be
. Then we can perform casework on ones digit parity to show that the tens digit is always odd. Furthermore, the maximum in this case is
, so we only need to test the tens digit equal to
. These efforts result in no solutions, so
is the only solution, which clearly works.