a_n=\left\lfloor\frac{n}{2}\right\rfloor+1