Given a positive integer $n,$ let $S(n)$ be the number of digits in the decimal expansion of $n,$ and let $$f(n)=n\cdot S(n)\cdot S(S(n))\cdot\ldots$$ Note that this is well-defined, since repeatedly applying $S$ eventually yields a stable state at $1$. For example, $$f(99)=99\cdot 2\cdot 1\cdot1\cdot\ldots=198$$ and $$f\left(10^{100}\right)=10^{100}\cdot 101\cdot 3\cdot 1\cdot1\cdot\ldots=303\cdot 10^{100}.$$ Does the sum $\displaystyle\sum_{n=1}^{\infty}\frac{1}{f(n)}$ converge or diverge?
Some context: I'm trying to find the limits of what can be done with the integral test. The functions $\frac{1}{x},$ $\frac{1}{x\ln(x)},$ $\frac{1}{x\ln(x)\ln(\ln(x))},$ etc. have integrals of $\ln(x),$ $\ln(\ln(x)),$ $\ln(\ln(\ln(x)))$ etc. respectively, so infinite sums over these functions diverge ever more slowly as you add more terms; this is an attempt to find out what the limiting behavior looks like. Base 10 used for ease of reading, but the answer in any base should be the same since sums are off by at most a constant factor.