Find the smallest positive integer that satisfies the equation above, where denotes the digit sum of .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let A(n) = n + S(n) + S(S(n)) = 2016
First, we will find a lower boundary for n.
As the biggest 3-digit number is 999, the maximum for S(n) is 9×3 =27, and the biggest value for S(S(n)) is 10 (when S(n)=19), the biggest value which we can achieve, cannot be bigger, than
999 + 27 + 10 = 1036 (and it is also easy to see, that the actual maximum value is 1035) , which is much smaller, than 2016.
Hence, we have to look for a 4-digit number.
As the smallest 4 digit numbers start with 1 and 2016 is very close to 1999, we will look for numbers between 1000 and 1999 first.
Now, we can find a lower boundary for n.
n is minimal, when S(n) and S(S(n)) are maximal (as their sum with n is constant).
The maximum value of S(n) is 1+ 9 + 9 + 9 = 28, and the maximum value of S(S(n)) is 10 (both at 28 and 19).
Therefore, the minimum value for n is not smaller, than
2016 - 28 - 10=1978
While A(1978)= 1978 + 25 + 7 = 2010 is not the solution (too small), by examining the values of A(n) for values of n slightly greater, than 1978, we will get our solution ( n = 1 9 8 6 ) quickly.
A(1986)= 1986 + 24 + 6 = 2016