OFFSET
1,2
COMMENTS
This is a generalization of A072618. The integer k is in this sequence if either (a) 4k-1 and 2k+1 are prime, or (b) 2k+2i-1, 2k+2i+1 and 2i+1 are prime for some 0 < i < k. The Mathematica program computes a prime circle for such k. It is very easy to show that there are prime circles for large k, such as 10^10.
LINKS
Eric Weisstein's World of Mathematics, Prime Circle.
EXAMPLE
k=10 is a term because one solution is {1, 2, 3, 8, 5, 6, 7, 4, 9, 20, 11, 18, 13, 16, 15, 14, 17, 12, 19, 10} and the even numbers are in three decreasing sequences {2}, {8, 6, 4} and {20, 18, 16, 14, 12, 10}. Note that this solution contains {1, 2} and {1, 2, 3, 8, 5, 6, 7, 4}, which are solutions for k=1 and k=4.
MATHEMATICA
n=10; lst={}; i=0; found=False; While[i<n&&!found, i++; If[i==n, found=PrimeQ[4n-1]&&PrimeQ[2n+1], found=PrimeQ[2n+2i-1]&&PrimeQ[2n+2i+1]&&PrimeQ[2i+1]]]; If[found, lst=Flatten[Table[{2j-1, 2n-2(j-i)}, {j, i, n}]], Print["no solution using this method"]]; If[found, While[n=i-1; n>0, i=0; found=False; While[i<n&&!found, i++; found=PrimeQ[2n+2i-1]&&PrimeQ[2n+2i+1]]; If[found, lst=Flatten[Append[Table[{2j-1, 2n-2(j-i)}, {j, i, n}], lst]]]]]; lst
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
T. D. Noe, Jul 01 2002
STATUS
approved