|
|
A072617
|
|
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.
|
|
5
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
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.
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).
|
|
LINKS
|
|
|
EXAMPLE
|
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}.
|
|
MATHEMATICA
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|