Determine all integers $n\geq 1$ for which the numbers $1,2,\ldots,n$ may be (re)ordered as $a_1,a_2,\ldots,a_n$ in such a way that the average $\dfrac {a_1+a_2+\cdots + a_k} {k}$ is an integer for all values $1\leq k\leq n$.

(Dan Schwarz)