# A Problem on Sequence

Define a sequence $$u_n$$, where $$n = 0,1,2,\ldots$$ as follows: $$u_0 = 0 , u_1 = 1$$, and for each $$n\geq 1$$, $$u_{n+1}$$ is the smallest positive integer such that $$u_{n+1} > u_{n}$$ and $$\{u_{0}, u_{1},\ldots, u_{n+1} \}$$ contains no three elements which are in arithmetic progression. Find $$u_{2016}$$.

×