TITLE: For which $n$ is there a permutation such that the sum of any two adjacent elements is a prime?
QUESTION [25 upvotes]: For which $n$ is it possible to find a permutation of the numbers from $1$ to $n$ such that the sum of any two adjacent elements of the permutation is a prime?
For example: For $n=4$ the permutation $(1,2,3,4)$ has sums $1+2=3$, $2+3=5$, $3+4=7$,and $4+1=5$.
For $n=16$ the permutation $(1,2,3,4,7,6,5,14,15,16,13,10,9,8,11,12)$ has sums of adjacent elements $(3,5,7,11,13,11,19,29,31,29,23,19,17,19,23,13)$.

REPLY [4 votes]: The question is not new. In fact, in 1982 Antonio Filz [J. Recreational Math. 14(1982), p.64] conjectured that for any $n = 2,4,6,\ldots$ there is a circular permutation $i_1,\ldots,i_n$ of $1,\ldots,n$ such that all the $n$ adjacent sums 
$$i_1 + i_2,\ i_2 + i_3,\ \ldots,\ i_{n−1} + i_n,\ i_n + i_1$$
are prime. 
In 2013  I made a similar conjecture involving twin primes. I conjectured that for any positive integer $n$ there is a circular permutation $i_0,i_1,\ldots,i_n$ of $0,1,\ldots,n$ such that all the $n + 1$ adjacent sums 
$$i_0 + i_1,\ i_1 + i_2, \ \ldots,\ i_{n−1} + i_n,\ i_n + i_0$$
 belong to the set $$S=\{k ∈\mathbb N :\ 6k −1\ \text{and}\ 6k + 1\ \text{are twin primes}\}.$$ See http://oeis.org/A228917.