# Recursive Digit Sum

Given a positive integer $$n$$, let $$S(n)$$ denote the digit sum of $$n$$. Consider the sequence of numbers given by

$\begin{cases} n_1 = S(n) \\ n_k = S(n_{k-1} ) & k \geq 2 \\ \end{cases}$

For how many positive integers $$n \le 2013$$ does the sequence $$\{ n_k \}$$ contain the number $$9$$?

×