第 889 题:(2007 AMC 10a, 25; 2007 AMC 12a, 22)
For each positive integer $n$, let $S(n)$ denote the sum of the digits of $n.$ For how many values of $n$ is $n + S(n) + S(S(n)) = 2007?
$ $\textbf{(A)}\ 1 \qquad \textbf{(B)}\ 2 \qquad \textbf{(C)}\ 3 \qquad \textbf{(D)}\ 4 \qquad \textbf{(E)}\ 5$
- $n\equiv S(n)\equiv S(S(n))\pmod 9$, so $3n\equiv2007\equiv0\pmod9$, i.e.\ $3\mid n$. Also $S(n)\le28$ and $S(S(n))\le10$, so $n\ge1969$.
- Check multiples of $3$ from $1971$ to $2007$: $1977,1980,1983,2001$ work (e.g.\ $1977+24+6$, $2001+3+3$).
- So $4$ values. The answer is (D).
For each positive integer $n$, let $S(n)$ be the sum of the digits of $n$. For how many values of $n$ is $n+S(n)=2025$?