From Tom Rich comes a short-ish puzzle with a long-ish answer:
For any positive, base-10 integer N, define f(N) as the number of times you have to add up its digits until you get a one-digit number. For example, f(23) = 1 because 2+3 = 5, a one-digit number. Meanwhile, f(888) = 2, since 8+8+8 = 24, a two-digit number, and then adding up those digits gives you 2+4 = 6, a one-digit number.
Find the smallest whole number N such that f(N) = 4.
Now that you’ve had some fun with larger numbers, let’s return to more mundane orders of magnitude.
For how many whole numbers N between 1 and 10,000 (inclusive, not that it matters) does f(N) = 3?
The maximum sum is $36$, from $9,999$. The values of $M \le 36$ such that $f(M) = 2$ are $M = 19, 28, 29$. From these values of $M$, calculate the number of ways to sum the digits of $N$ to achieve $M$, thus $f(N) = 3$.
The maximum sum of a 3 digit number is $999$. Subtracting 8 from the values of the digits in any manner will yield a sum of $19$. 8 'subtractions' to be placed among 3 digits can be represented as
$\dfrac{10!}{8!2!} = 45$
I could not find a clean way to calculate this. Using code I found there are 615.
Similar to 3-digit of $N=19$, calculate the number of ways to take away $8$ from the digits of $9999$.
$\dfrac{11!}{8!3!} = 165$
Similar to 3-digit of $N=19$, and $N=28$ calculate the number of ways to take away $7$ from the digits of $9999$.
$\dfrac{10!}{7!3!} = 120$
$45+615+165+120 = 945$