Difference between revisions of "2006 AMC 12B Problems/Problem 25"

(Solution 1)
(solution 2)
 
(3 intermediate revisions by one other user not shown)
Line 14: Line 14:
 
</math>
 
</math>
  
== Solution 1 ==
+
== Solution 1==
Define <math>g:= \gcd(999,a_2)</math>; then <math>g\mid a_3</math>, and, by induction, <math>g\mid a_k</math> for all <math>k>0</math>. Since <math>a_{2006}=1</math>, we have <math>g=1</math>, i.e. <math>a_2</math> is in the set, <math>S</math>, of positive integers less than <math>999</math> and relatively prime to <math>999</math>. We have <math>|S|=\varphi(999)=648</math>. Moreover, <math>a_2</math> must be odd, because if <math>a_2</math> is even, then every third term after <math>a_2</math> will be even; in particular, <math>2006\equiv 2\pmod 3</math>, so <math>a_{2006}</math> must be even, which is not the case. The subset of odd integers in <math>S</math> (denoted <math>S_{\textrm{o}}</math>) is in <math>1</math>--<math>1</math> correspondence with the subset of even integers in <math>S</math> via <math>x \mapsto 999 - x</math>; so <math>a_2\in S_{\textrm{o}}</math> with <math>|S_{\textrm{o}}|=324</math>.
 
 
 
We will now show that <math>a_{2006}=1</math> whenever <math>a_2\in S_{\textrm{o}}</math>. Suppose <math>a_2\in S</math> is odd, and define <math>M_i=\max(a_{i}, a_{i+1})</math> and <math>m_i=\min(a_{i}, a_{i+1})</math>.
 
 
 
Since <math>a_{i+1}=M_{i-1}-m_{i-1} \le M_{i-1}</math>, we have <math>M_i \le M_{i-1}</math> for all <math>i>0</math>. In fact, as long as <math>a_j\neq 0</math> for <math>j\le i</math>, we have <math>a_{i+1}< M_{i-1}</math> and it follows that <math>M_{i+1} < M_{i-1}</math>. Then <math>M_1=999</math>, <math>M_3\le 998</math>, <math>M_5\le 997</math>, and, in general, <math>M_{2k+1}\le 999-k</math>. This implies that <math>a_k=0</math> for some <math>k\le 2000</math>. If <math>a_k=0</math> then <math>a_{k-2}=a_{k-1}=a</math> (say), and it follows that <math>a\mid a_{k-3}</math>, and, by induction, <math>a\mid a_j</math> for all <math>j=1,2,\ldots , k-1</math>. Then <math>a\mid \gcd(999,a_2)=1</math>, so <math>a=1</math>. Therefore, the sub-sequence <math>\{a_i\}_{i\ge k-2}</math> <math>(k\le 2000)</math> will be<cmath>1, 1, 0, 1, 1, 0, \ldots</cmath>In particular, <math>a_{2006}</math> will be either <math>0</math> or <math>1</math>; but since <math>a_2</math> is odd, every third term after <math>a_2</math> will be odd, so <math>a_{2006}</math> must be odd, so it must equal <math>1</math>. We have shown that <math>a_2\in S_{\textrm{o}}</math> implies <math>a_{2006}=1</math>. So our final answer is <math>|S_{\textrm{o}}|=324</math>, or <math>\boxed{\text{B}}</math>.
 
 
 
== Solution 2==
 
 
We say the sequence <math>(a_n)</math> completes at <math>i</math> if <math>i</math> is the minimal positive integer such that <math>a_i = a_{i + 1} = 1</math>. Otherwise, we say <math>(a_n)</math> does not complete.
 
We say the sequence <math>(a_n)</math> completes at <math>i</math> if <math>i</math> is the minimal positive integer such that <math>a_i = a_{i + 1} = 1</math>. Otherwise, we say <math>(a_n)</math> does not complete.
  
Line 76: Line 69:
  
  
There are <math>\phi(999) = 648</math> numbers less than <math>999</math> and relatively prime to it (<math>\phi</math> is the Euler totient function). We want to count how many of these are even. Note that
+
There are <math>\phi(999) = 648</math> numbers less than <math>999</math> and relatively prime to it (<math>\phi</math> is the Euler totient function). We want to count how many of these are odd. Note that
 
<cmath>t \mapsto 999 - t</cmath>
 
<cmath>t \mapsto 999 - t</cmath>
 
is a 1-1 correspondence between the odd and even numbers less than and relatively prime to <math>999</math>. So our final answer is <math>648/2 = 324</math>, or <math>\boxed{\text{B}}</math>.
 
is a 1-1 correspondence between the odd and even numbers less than and relatively prime to <math>999</math>. So our final answer is <math>648/2 = 324</math>, or <math>\boxed{\text{B}}</math>.
 +
 +
==Solution 2 (estimation)==
 +
As in Solution 1, we show that <math>a_2</math> must be odd. We notice that, after experimentation, all numbers eventually end up in a sequence <math>1,1,0,1,1,0,\ldots</math>, which points to the assumption that every <math>2</math> out of <math>3</math> values for <math>a_2</math> work due to residue classes. Combining this with an estimated 50-50 chance that these values are either odd or even, since <math>999</math> values are nonnegative integers less than <math>999</math>, we can estimate that there are about <math>999\cdot\frac{2}{3}\cdot\frac{1}{2}=333</math> different values of <math>a_2</math> that work. The closest answer choice by far is <math>\boxed{\textbf{(B) }324}</math>.
 +
 +
~eevee9406
  
 
== See also ==
 
== See also ==
 
{{AMC12 box|year=2006|ab=B|num-b=24|after=Last Question}}
 
{{AMC12 box|year=2006|ab=B|num-b=24|after=Last Question}}
 
{{MAA Notice}}
 
{{MAA Notice}}

Latest revision as of 22:32, 9 November 2024

Problem

A sequence $a_1,a_2,\dots$ of non-negative integers is defined by the rule $a_{n+2}=|a_{n+1}-a_n|$ for $n\geq 1$. If $a_1=999$, $a_2<999$ and $a_{2006}=1$, how many different values of $a_2$ are possible?

$\mathrm{(A)}\ 165 \qquad \mathrm{(B)}\ 324 \qquad \mathrm{(C)}\ 495 \qquad \mathrm{(D)}\ 499 \qquad \mathrm{(E)}\ 660$

Solution 1

We say the sequence $(a_n)$ completes at $i$ if $i$ is the minimal positive integer such that $a_i = a_{i + 1} = 1$. Otherwise, we say $(a_n)$ does not complete.


Note that if $d = \gcd(999, a_2) \neq 1$, then $d|a_n$ for all $n \geq 1$, and $d$ does not divide $1$, so if $\gcd(999, a_2) \neq 1$, then $(a_n)$ does not complete. (Also, $a_{2006}$ cannot be 1 in this case since $d$ does not divide $1$, so we do not care about these $a_2$ at all.)

From now on, suppose $\gcd(999, a_2) = 1$.


We will now show that $(a_n)$ completes at $i$ for some $i \leq 2006$. We will do this with 3 lemmas.


Lemma: If $a_j \neq a_{j + 1}$, and neither value is $0$, then $\max(a_j, a_{j + 1}) > \max(a_{j + 2}, a_{j + 3})$.

Proof: There are 2 cases to consider.

If $a_j > a_{j + 1}$, then $a_{j + 2} = a_j - a_{j + 1}$, and $a_{j + 3} = |a_j - 2a_{j + 1}|$. So $a_j > a_{j + 2}$ and $a_j > a_{j + 3}$.

If $a_j < a_{j + 1}$, then $a_{j + 2} = a_{j + 1} - a_j$, and $a_{j + 3} = a_j$. So $a_{j + 1} > a_{j + 2}$ and $a_{j + 1} > a_{j + 3}$.

In both cases, $\max(a_j, a_{j + 1}) > \max(a_{j + 2}, a_{j + 3})$, as desired.


Lemma: If $a_i = a_{i + 1}$, then $a_i = 1$. Moreover, if instead we have $a_i = 0$ for some $i > 2$, then $a_{i - 1} = a_{i - 2} = 1$.

Proof: By the way $(a_n)$ is constructed in the problem statement, having two equal consecutive terms $a_i = a_{i + 1}$ implies that $a_i$ divides every term in the sequence. So $a_i | 999$ and $a_i | a_2$, so $a_i | \gcd(999, a_2) = 1$, so $a_i = 1$. For the proof of the second result, note that if $a_i = 0$, then $a_{i - 1} = a_{i - 2}$, so by the first result we just proved, $a_{i - 2} = a_{i - 1} = 1$.


Lemma: $(a_n)$ completes at $i$ for some $i \leq 2000$.

Proof: Suppose $(a_n)$ completed at some $i > 2000$ or not at all. Then by the second lemma and the fact that neither $999$ nor $a_2$ are $0$, none of the pairs $(a_1, a_2), ..., (a_{1999}, a_{2000})$ can have a $0$ or be equal to $(1, 1)$. So the first lemma implies \[\max(a_1, a_2) > \max(a_3, a_4) > \cdots > \max(a_{1999}, a_{2000})  > 0,\] so $999 = \max(a_1, a_2) \geq 1000$, a contradiction. Hence $(a_n)$ completes at $i$ for some $i \leq 2000$.



Now we're ready to find exactly which values of $a_2$ we want to count.

Let's keep in mind that $2006 \equiv 2 \pmod 3$ and that $a_1 = 999$ is odd. We have two cases to consider.


Case 1: If $a_2$ is odd, then $a_3$ is even, so $a_4$ is odd, so $a_5$ is odd, so $a_6$ is even, and this pattern must repeat every three terms because of the recursive definition of $(a_n)$, so the terms of $(a_n)$ reduced modulo 2 are \[1, 1, 0, 1, 1, 0, ...,\] so $a_{2006}$ is odd and hence $1$ (since if $(a_n)$ completes at $i$, then $a_k$ must be $0$ or $1$ for all $k \geq i$).


Case 2: If $a_2$ is even, then $a_3$ is odd, so $a_4$ is odd, so $a_5$ is even, so $a_6$ is odd, and this pattern must repeat every three terms, so the terms of $(a_n)$ reduced modulo 2 are \[1, 0, 1, 1, 0, 1, ...,\] so $a_{2006}$ is even, and hence $0$.



We have found that $a_{2006} = 1$ is true precisely when $\gcd(999, a_2) = 1$ and $a_2$ is odd. This tells us what we need to count.


There are $\phi(999) = 648$ numbers less than $999$ and relatively prime to it ($\phi$ is the Euler totient function). We want to count how many of these are odd. Note that \[t \mapsto 999 - t\] is a 1-1 correspondence between the odd and even numbers less than and relatively prime to $999$. So our final answer is $648/2 = 324$, or $\boxed{\text{B}}$.

Solution 2 (estimation)

As in Solution 1, we show that $a_2$ must be odd. We notice that, after experimentation, all numbers eventually end up in a sequence $1,1,0,1,1,0,\ldots$, which points to the assumption that every $2$ out of $3$ values for $a_2$ work due to residue classes. Combining this with an estimated 50-50 chance that these values are either odd or even, since $999$ values are nonnegative integers less than $999$, we can estimate that there are about $999\cdot\frac{2}{3}\cdot\frac{1}{2}=333$ different values of $a_2$ that work. The closest answer choice by far is $\boxed{\textbf{(B) }324}$.

~eevee9406

See also

2006 AMC 12B (ProblemsAnswer KeyResources)
Preceded by
Problem 24
Followed by
Last Question
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 12 Problems and Solutions

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. AMC logo.png