2004 AIME I Problem 15
Problem 15 of 15HarderCombinatoricsProblem-Solving Techniques
For all positive integers let and define a sequence as follows: and for all positive integers Let be the smallest such that (For example, and ) Let be the number of positive integers such that Find the sum of the distinct prime factors of
Your answer
Integer from 0 to 999
Show solution
Solution
Work backwards: for (always) and for (provided is not a multiple of and i.e. does not end in and ). So the integers with form column of a tree rooted at the columns begin and every vertex has two children except and the vertices ending in which have only the child
Locate those one-child vertices. Since the vertex sits in column A vertex ending in is reached by subtracting nine times from a vertex ending in so such vertices sit columns after the multiples of in the tree. Columns through double perfectly (no one-child vertices occur that early), so column has vertices, of which the multiples of — the children of column — number Hence for column contains vertices ending in (column has none, because the multiple of in column is itself, whose descendant is excluded — that exclusion is exactly the missing child of ).
A one-child vertex in column removes of the potential vertices from column Therefore Since is prime, the sum of the distinct prime factors of is
Tagged: recursive counting · tree diagram · work backwards