2018 USAJMO Problems/Problem 1
Problem
For each positive integer , find the number of -digit positive integers that satisfy both of the following conditions: [list] [*] no two consecutive digits are equal, and [*] the last digit is a prime. [/list]
Solution 1
The answer is .
Suppose denotes the number of -digit numbers that satisfy the condition. We claim , with . [i]Proof.[/i] It is trivial to show that . Now, we can do casework on whether or not the tens digit of the -digit integer is prime. If the tens digit is prime, we can choose the digits before the units digit in ways and choose the units digit in ways, since it must be prime and not equal to the tens digit. Therefore, there are ways in this case.
If the tens digit is not prime, we can use complementary counting. First we consider the number of -digit integers that do not have consecutive digits. There are ways to choose the first digit and ways to choose the remaining digits. Thus, there are integers that satisfy this. Therefore, the number of those -digit integers whose units digit is not prime is . It is easy to see that there are ways to choose the units digit, so there are numbers in this case. It follows that and our claim has been proven.
Then, we can use induction to show that . It is easy to see that our base case is true, as . Then, \begin{align*} a_{n+1}&=4\cdot 9^n-a_n\\ &=4\cdot 9^n-\frac{2}{5}\left(9^n+(-1)^{n+1}\right)\\ &=4\cdot 9^n-\frac{2}{5}\cdot 9^n-\frac{2}{5}(-1)^{n+1}\\ &=\left(4-\frac{2}{5}\right)\cdot 9^n-\frac{2}{5}\cdot\frac{(-1)^{n+2}}{(-1)}\\ &=\frac{18}{5}\cdot 9^n+\frac{2}{5}\cdot(-1)^{n+2}\\ &=\frac{2}{5}\left(9^{n+1}+(-1)^{n+2}\right), \end{align*} as desired.
Solution by TheUltimate123.
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.
See also
2018 USAJMO (Problems • Resources) | ||
First Problem | Followed by Problem 2 | |
1 • 2 • 3 • 4 • 5 • 6 | ||
All USAJMO Problems and Solutions |