Difference between revisions of "2004 AIME I Problems/Problem 15"
(solution) |
m (→Solution) |
||
Line 7: | Line 7: | ||
== Solution == | == Solution == | ||
− | We backcount the number of ways. Namely, we start at <math>x_{20} = 1</math>, which can only be reached if <math>x_{19} = 10</math>, and then we perform <math>18</math> operations that either consist of <math>A: (-1)</math> or <math>B: (\times 10)</math>. We represent these operations in a string format, starting with the operation that sends <math>f(x_{18}) = x_{19}</math> and so forth downwards. There are <math>2^9</math> ways to pick the first <math>9</math> operations; however, not all <math>9</math> of them may be <math>A: (-1)</math> otherwise we return back to <math>x_{10} = 1</math>, contradicting our assumption that <math>20</math> was the smallest value of <math>n</math>. | + | We backcount the number of ways. Namely, we start at <math>x_{20} = 1</math>, which can only be reached if <math>x_{19} = 10</math>, and then we perform <math>18</math> operations that either consist of <math>A: (-1)</math> or <math>B: (\times 10)</math>. We represent these operations in a string format, starting with the operation that sends <math>f(x_{18}) = x_{19}</math> and so forth downwards. There are <math>2^9</math> ways to pick the first <math>9</math> operations; however, not all <math>9</math> of them may be <math>A: (-1)</math> otherwise we return back to <math>x_{10} = 1</math>, contradicting our assumption that <math>20</math> was the smallest value of <math>n</math>. Using [[complementary counting]], we see that there are only <math>2^9 - 1</math> ways. |
Since we performed the operation <math>B: (\times 10)</math> at least once in the first <math>9</math> operations, it follows that <math>x_{10} \ge 20</math>, so that we no longer have to worry about reaching <math>1</math> again. Thus the remaining <math>9</math> operations can be picked in <math>2^9</math> ways, with a total of <math>2^9(2^9 - 1) = 2^{18} - 2^9</math> strings. | Since we performed the operation <math>B: (\times 10)</math> at least once in the first <math>9</math> operations, it follows that <math>x_{10} \ge 20</math>, so that we no longer have to worry about reaching <math>1</math> again. Thus the remaining <math>9</math> operations can be picked in <math>2^9</math> ways, with a total of <math>2^9(2^9 - 1) = 2^{18} - 2^9</math> strings. |
Revision as of 13:04, 15 March 2012
Problem
For all positive integers , let
\[f(x)=\begin{cases}1 & \text{if x = 1}}\\ \frac x{10} & \text{if x is divisible by 10}\\ x+1 & \text{otherwise}\end{cases}\] (Error compiling LaTeX. Unknown error_msg)
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 .
Solution
We backcount the number of ways. Namely, we start at , which can only be reached if , and then we perform operations that either consist of or . We represent these operations in a string format, starting with the operation that sends and so forth downwards. There are ways to pick the first operations; however, not all of them may be otherwise we return back to , contradicting our assumption that was the smallest value of . Using complementary counting, we see that there are only ways.
Since we performed the operation at least once in the first operations, it follows that , so that we no longer have to worry about reaching again. Thus the remaining operations can be picked in ways, with a total of strings.
However, we must also account for a sequence of or more s in a row, because that implies that at least one of those numbers was divisible by , yet the was never used, contradiction. We must use complement counting again by determining the number of strings of s of length such that there are s in a row. The first ten are not included since we already accounted for that scenario above, so our string of s must be preceded by a . There are no other restrictions on the remaining seven characters. Letting to denote either of the functions, and to indicate that the character appears times in a row, then our bad strings can take the forms:
&\underbrace{BA^{[10]}}\square \square \square \square \square \square \square \square \ &\square \underbrace{BA^{[10]}}\square \square \square \square \square \square \square \ &\qquad \quad \cdots \quad \cdots \ &\square \square \square \square \square \square \square \underbrace{BA^{[10]}} \square \ &\square \square \square \square \square \square \square \square \underbrace{BA^{[10]}} \
\end{align*}$ (Error compiling LaTeX. Unknown error_msg)There are ways to select the operations for the s, and places to place our block. Thus, our answer is , and the answer is .
See also
2004 AIME I (Problems • Answer Key • Resources) | ||
Preceded by Problem 14 |
Followed by Last Question | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |