%I #9 Oct 10 2012 14:40:57
%S 1,1,1,1,1,2,1,1,1,0,0,2,1,1,2,0,0,1,1,1,3,0,0,1,0,0,2,1,1,2,0,0,2,1,
%T 1,1,0,0,3,0,0,1,0,0,3,0,0,3,1,1,1,1,1,3,0,0,0,0,0,5,0,0,3,0,0,4,1,1,
%U 4,0,0,2,1,1,2,0,0,2,0,0,4,0,0,5,0,0,4,1,1,5,0,0,3,1,1,2,1,1,4,0
%N Number of essentially different ways of arranging numbers 1 through 2n around a circle so that the sum of each pair of adjacent numbers is prime, with the odd and even numbers in order in opposite directions.
%C A very restricted form of the prime circle problem whose sequence is A051252. Finding these solutions is very fast because there are only n possible solutions to try. See A072616 for the case where only the odd numbers or only the even numbers are in order. Note that a(2)=1 because the two solutions are essentially the same. Solutions can be printed by removing comments from the Mathematica program.
%C There is a provable solution for n when either (a) 2n+1 and 2n+3 are prime, (b) 2k+1, 2k+3, 2k+2n+1 and 2k+2n+3 are prime for some 0 < k < n-1, or (c) 2n-1, 2n+1 and 4n-1 are primes. Part (a) is due to Mike Hennebry. Note that cases (a) and (b) involve 3 sets of twin primes. For n > 3, due to the form of twin primes, it can be shown that (a) implies not (b) and not (c).
%H T. D. Noe, <a href="/A072617/b072617.txt">Table of n, a(n) for n=1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeCircle.html">Prime Circle.</a>
%e a(6) = 2 because there are two ways: {1,10,3,8,5,6,7,4,9,2,11,12} and {1,4,3,2,5,12,7,10,9,8,11,6}.
%t For[lst={}; n=1, n<=100, n++, oddTable=Append[Table[2i-1, {i, n}], 1]; evenTable=Table[2n+2-2i, {i, n}]; evenTable=Join[evenTable, evenTable]; For[cnt=0; i=1, i<=n, i++, j=0; allPrime=True; While[j<n&&allPrime, j++; allPrime= PrimeQ[oddTable[[j]]+evenTable[[i+j-1]]]&& PrimeQ[oddTable[[j+1]]+evenTable[[i+j-1]]]]; (*If[allPrime, For[soln={}; j=1, j<=n, j++, AppendTo[soln, oddTable[[j]]]; AppendTo[soln, evenTable[[i+j-1]]]]; Print[soln]]; *)If[allPrime, cnt++ ]]; AppendTo[lst, cnt]]; lst
%Y Cf. A051252, A072616, A072618.
%K nice,nonn
%O 1,6
%A _T. D. Noe_, Jun 25 2002