# A very curious sequence

Algebra Level pending

Let us have the next recursive sequence of interger numbers $$a(n)$$

$$a(1)=1 \\ \\ a(n)=\begin{cases}-a(n/2), & \mbox { if } n \mbox { is even } \\ 1+a(n-1), & \mbox { if } n \mbox { is odd } \end{cases}$$

Find the minimum integer $$n$$ such that $$a(n)=1000$$. How many digits does it have?

×