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\le100$ is $a_1$ less than each of $a_2$, $a_3$, and $a_4$?
If $a_1$ is even, $a_2=\frac{a_1}2<a_1$. If $a_1$ is odd, $a_2=3a_1-1$ is even and $a_3=\frac{3a_1-1}2$; both exceed $a_1$ when $a_1>1$ (for $a_1=1$ the sequence is $1,2,1,\dots$).
If $a_1\equiv3\pmod4$, then $3a_1-1\equiv0\pmod4$, so $a_3$ is even and $a_4=\frac{3a_1-1}4<a_1$. If $a_1\equiv1\pmod4$, then $3a_1-1\equiv2\pmod4$, so $a_3$ is odd and $a_4=3a_3-1>a_3>a_1$.