Find all $n$ such that $1,2,3, \cdots, n$ can arranged around a $n$-sided polygon such that any sum of three consecutive numbers is even. First of all this is my first question at Stackexchange, so I'm sorry for the mistakes if there are any. I want to point out, that this is not my homework. I'm preparing for an exam by doing exercies and I've got a problem with this one: 

There are numbers $1,2,\cdots,n$ are located in vertices of a regular $n$-sided polygon. They are
  arranged in a special way: the  sum of numbers that are located in each
  3 subsequent vertices of the aforementioned polygon is even. Find all
  natural numbers $n\ge3$ for which such arrangement is possible.

I'd be grateful if you provided some clues, hints or give me a full solution (if possible). I just want to understand train of thought.
Thank you very much.
Best regards,
Sarah
 A: Consider the "parity" (even-ness or odd-ness) of the numbers of three consecutive vertices.
The sum must be even, so they cannot all be odd and they cannot have just one odd number. The only possibilities are all even or two odd and one even. If all three are even, so must the ones on either side of the triple, and so must the next ones, and so on. This means all the numbers in the polygon must be even, which is not possible for $1,2,\ldots,n$. Therefore the numbers in the triple are not all even.
So we have two of them odd and one of them even, OOE. The other one next to the even must be odd. We see that the parity pattern around the polygon must be OOEOOEOOE.... There are twice as many odd numbers as even ones. The only $n$ for which this is possible is $n=3$, so the pattern is $1,2,3$.
Therefore $n=3$ is the only possibility.
A: Hint: If $a_1,a_2,a_3,a_4$ are the numbers at four consecutive vertices, then $a_1+a_2+a_3$ and $a_2+a_3+a_4$ are even, hence $a_1\equiv a_4\pmod 2$.
What happens if $n$ is a multiple of $3$? What happens if $n$ is not a multiple of $3$?
A: Assume there is such an arrangement $x_1 , x_2 , \ldots , x_n$ on a circle clockwise arranged . 
Now take some $x_k$ and observe that $x_k+x_{k+1}+x_{k+2}$ and also $x_{k+1}+x_{k+2}+x_{k+3}$ are even numbers. This means that $x_k$ and $x_{k+3}$ have the same parity :
$$x_k \equiv x_{k+3} \pmod{2}$$ for every $k$ . 
Now use it to get (note that $x_{n+1}=x_1 , x_{n+2}=x_2 $ etc because we're on a circle ) :
$$x_1 \equiv x_4 \equiv \ldots \equiv x_{3l+1} \pmod{2}$$ for every $l$ .
Now if $n$ isn't divisible by $3$ then there is some $a$ such that $$an \equiv 1 \pmod{3}$$ (by Bezout )
so $an=3b+1$ for a $b$ .Now simply put $l=b$ to get :
$$x_1 \equiv x_{3b+1}\equiv x_{na} = x_{n}\equiv x_3\pmod{2}$$
Also by Bezout there is some $c$ and $d$ such that $cn=3d+2$ so put $l=d$ to get :
$$x_1 \equiv x_{3d+1}=x_{cn-1}=x_{n-1} \equiv x_2 \pmod{2}$$ 
But then :
$$x_1 \equiv x_2 \equiv x_3 \equiv x_4 \equiv \ldots \equiv x_n \pmod{2}$$ so all numbers have the same parity which is false .
So $n$ must be divisible with $3$ (denote $n=3k$ ).
We know also that $x_1 \equiv x_4 \equiv \ldots x_{3k-2} \pmod{2}$ and the analogues for $x_2$ , $x_3$ .
If $x_1 , x_2 , x_3$ are even we get a contradiction again .So one is even and the other two are odd . Using the congruences this means that there are $k$ even numbers and $2k$ odd numbers from $1$ to $n$ . But they couldn't differ by more than $1$ so :
$$2k-k \leq 1$$ 
$k \leq 1$ so $n=3$ is the only solution (and the construction is simple )
