AoPSWiki
Looking for a challenging geometry text? Preparing for MATHCOUNTS or the AMC exams? Check out Art of Problem Solving's Introduction to Geometry by Richard Rusczyk.

2008 Mock ARML 1 Problems/Problem 2

From AoPSWiki

Problem

A positive integer n is a yo-yo if the absolute value of the difference between any two consecutive digits of n is at least 7 . Compute the number of 8-digit yo-yos.

Solution

Note that all of the digits must be \in \{0,1,2,7,8,9\}. Let a_n be the number of yo-yos with n digits and with a leftmost digit of 0 if n is odd (0 being a placeholder) or 9 if n is even, let b_n those with a leftmost digit of 1 if n is odd or 8 if n is even, and let c_n those with a leftmost digit of 2 if n is odd or 7 if n is even. By symmetry, the desired answer is 2(a_8 + b_8 + c_8) - a_8, to exclude the integers with leftmost digit 0.

Note that a yo-yo of n digits with leftmost digit of 0 can be formed from a yo-yo of n-1 digits with leftmost digits of 7,8,9; those with a leftmost digit of 1 can be formed by those ending in 8,9; and those with a leftmost digit of 2 can be formed only by those ending in 9. The same holds true for the leftmost digits of 9,8,7, respectively. Thus, we have the recursions \begin{align*}a_{n+1} &= a_n + b_n + c_n\\b_{n+1} &= a_n + b_n\\c_{n+1} &= a_n\end{align*} Setting up a table, \begin{tabular}{|r||r|r|r|}\hlinen & a_n & b_n & c_n \\\hline1 & 1 & 1 & 1 \\2 & 3 & 2 & ... The answer is 353 + 2(283 + 157) = \boxed{1233}.

See also

2008 Mock ARML 1 (Problems, Source)
Preceded by
Problem 1
Followed by
Problem 3
1 2 3 4 5 6 7 8
Stay informed about new Art of Problem Solving developments.
Click here to join our mailing lists.
© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us