How many times can you add up the digits?

This week’s Fiddler is a puzzle about adding digits over and over again.

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$.

Extra Credit: For how many whole numbers $n$ between $1$ and $10,000$ does $f(n) = 3$?

My solution:
[Show Solution]

Leave a Reply

Your email address will not be published. Required fields are marked *