Let s1,s2, and s3 represent s(n), s(s(n)), and s(s(s(n))) respectively. If there exists a four digit number n that satisfies the above equation, then s1 <= 36 --> s1/n < .036. If n has more than 4 digits, the upper bound for s1/n is even smaller.
Assume there exists n with n>999 that satisfies the above equation. So s1/n<.036 But s3<=s2<=s1<.036n --> 4s1+3s2+2s3 < .324n --> n-1<.324n --> n<1.47 which contradicts our assumption. So there are no solutions greater than 999.
Let E=4s1+3s2+2s3+1. If n<1000 then s1<=27 --> s2<=10 --> s3<=9 --> E<=157 --> n<=157 --> s1<=18 --> s2<=9 --> s3<=9 --> E<=118 --> n<=118.
Since a number and and the sum of its digits have the same value mod 9, it follows that n=4n+3n+2n+1 mod 9 --> n=1 mod 9. So we need only consider n values of 1,10,19,28,37,46,55,64,73,82,91,100,109, and 118. But the E values associated with these possibilities are only 10 and 46 --> n=10 and n=46 only. |