Let \(a_1,a_2,\ldots\) be a sequence determined by the rule \(a_n= \frac{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\)?
I think there are 502 that satisfy the condition.
Only the odd numbers provide a2 greater than a1. There are 1004 of them.
All these a2's are even, so a3 = a2/2 = (3a1 + 1)/2 which is greater than a1.
The corresponding a4's must alternate even and odd. The even ones will be a3/2 = (3a1 + 1)/4 which must be less than or equal to a1 (equality when a1 = 1). The odd ones must be 3(3a1 + 1)/2 + 1 = 9a1/2 + 5/2 > a1. There are 1004/2 = 502 of these.