TITLE: 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.
QUESTION [5 upvotes]: 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

REPLY [2 votes]: 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 )