Problem

2004 AIME I Problem 15

For all positive integers x, let f(x)=\begin{cases}1 &\text{if }x = 1\\ \frac x{10} &\text{if }x\text{ is divisible by 10}\\ x+1 &\text{otherwise}\end{cases} and define a sequence as follows: x_1=x and x_{n+1}=f(x_n) for all positive integers n. Let d(x) be the smallest n such that x_n=1. (For example, d(100)=3 and d(87)=7.) Let m be the number of positive integers x such that d(x)=20. Find the sum of the distinct prime factors of m.

Leading zeroes must be inputted, so if your answer is 34, then input 034


Full credit goes to MAA for authoring these problems. These problems were taken on the AOPS website.


Show/Hide Problem Tags

Problem Tags: Algebra Counting and probability Number theory

Want to contribute problems and receive full credit? Click here to add your problem!
Please report any issues to us in our Discord server
Go to previous contest problem (SHIFT + Left Arrow)