For a positive integer K, define a sequence, {an}n, as following a1=K, a_{n+1} = \{ \begin{array} {cc} a_n-1 , & \mbox{ if } a_n \mbox{ is even} \\ \frac{a_n-1}2 , & \mbox{ if } a_n \mbox{ is odd} \end{array}, for all n≥1.
Find the smallest value of K, which makes a2005 the first term equal to 0. number theory unsolvednumber theory