# 2008 AMC 12A Problems/Problem 17

## Problem

Let $a_1,a_2,\ldots$ be a sequence determined by the rule $a_n=a_{n-1}/2$ if $a_{n-1}$ is even and $a_n=3a_{n-1}+1$ if $a_{n-1}$ is odd. For how many positive integers $a_1 \le 2008$ is it true that $a_1$ is less than each of $a_2$, $a_3$, and $a_4$?

$\mathrm{(A)}\ 250\qquad\mathrm{(B)}\ 251\qquad\mathrm{(C)}\ 501\qquad\mathrm{(D)}\ 502\qquad\mathrm{(E)} 1004$

## Solution

All positive integers can be expressed as $4n$, $4n+1$, $4n+2$, or $4n+3$, where $n$ is a nonnegative integer.

• If $a_1=4n$, then $a_2=\frac{4n}{2}=2n.
• If $a_1=4n+1$, then $a_2=3(4n+1)+1=12n+4$, $a_3=\frac{12n+4}{2}=6n+2$, and $a_4=\frac{6n+2}{2}=3n+1.
• If $a_1=4n+2$, then $a_2=2n+1.
• If $a_1=4n+3$, then $a_2=3(4n+3)+1=12n+10$, $a_3=\frac{12n+10}{2}=6n+5$, and $a_4=3(6n+5)+1=18n+16$.

Since $12n+10, 6n+5, 18n+16 > 4n+3$, every positive integer $a_1=4n+3$ will satisfy $a_1.

Since one fourth of the positive integers $a_1 \le 2008$ can be expressed as $4n+3$, where $n$ is a nonnegative integer, the answer is $\frac{1}{4}\cdot 2008 = 502 \Rightarrow D$.