Prove that there is a finite number of values of n that satisfy
n = 4s(n) + 3s(s(n)) + 2s(s(s(n))) + 1
where n is a positive integer and s(n) denotes the sum of the digits of n. Also, determine analytically, all values of n that satisfy the equation.
s(n) is logarithmic; at most, 9 times the number of digits of n, that is less than 1+log10(n). For n=1000, the left hand side is (far) greater than the right hand side, and the difference grows with n, so at most there can be 999 possible n values. (I tried 1000 out of hand; it seems a much smaller limit could be set, but that's enough to prove there's a finite number of n values.)