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.
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
Offset: 1
Examples
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}.
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
- Eric Weisstein's World of Mathematics, Prime Circle.
Programs
-
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
Comments