Consider constructing a vector $v=(a_1,a_2,\ldots,a_n)$ consisting of nonnegative integers such that $a_1=1$ and, if $a_j$'s are nonzero, then $a_j\equiv a_{n-j+2}+j-1 \pmod m\ \forall 1<j\le\frac{n}{2}$, where $m$ is the number of nonzero entries; with the additional constraint that all nonzero $a_i$'s are distinct modulo $m$. Note that the number $m$ itself appears once as a nonzero number satisfying the above congruence.

Is it always possible to construct such a vector? I think this should be possible if $m$ is odd. For example, $(1,4,2,5,3)$ and $(1,4,2,0,0,5,3)$ are such vectors. It is easy to construct if the first entries (within $\lfloor\frac{n}{2}\rfloor$) of the vector are consecutive. But, in other cases, it is not clear as to how to proceed with the construction. Any hints? Thanks beforehand.