This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A253202 #10 Mar 27 2015 09:20:51 %S A253202 0,0,0,4,7,71,2555,24897,970556 %N A253202 Number of essentially different ways of arranging the numbers 1 through 2n around a circle so that the sum of each pair of adjacent numbers is semiprime. %C A253202 Conjecture: a(n) > 0 for all n > 3. %C A253202 This implies the semiprime conjecture, and it is similar to the prime circle problem mentioned in A051252. %e A253202 Four arrangements for 2n = 8 are: %e A253202 {1,3,6,8,7,2,4,5}, %e A253202 {1,3,7,2,8,6,4,5}, %e A253202 {1,5,4,2,7,3,6,8}, %e A253202 {1,5,4,6,3,7,2,8}, so a(4) = 4; %e A253202 Seven arrangements for 2n = 10 are: %e A253202 {1,3,6,8,7,2,4,10,5,9}, %e A253202 {1,3,6,9,5,10,4,2,7,8}, %e A253202 {1,3,7,2,4,10,5,9,6,8}, %e A253202 {1,3,7,2,8,6,4,10,5,9}, %e A253202 {1,5,10,4,2,8,7,3,6,9}, %e A253202 {1,8,2,7,3,6,4,10,5,9}, %e A253202 {1,8,6,3,7,2,4,10,5,9}, so a(5) = 7; %t A253202 $RecursionLimit=500; try[lev_] := Module[{t, j}, If[lev>2n, (*then make sure the sum of the first and last is semiprime*) If[Plus@@Last/@FactorInteger [soln[[1]]+soln[[2n]]]==2&&soln[[2]]<=soln[[2n]], (*Print[soln]; *) cnt++ ], (*else append another number to the soln list*) t=soln[[lev-1]]; For[j=1, j<=Length[s[[t]]], j++, If[ !MemberQ[soln, s[[t]][[j]]], soln[[lev]]=s[[t]][[j]]; try[lev+1]; soln[[lev]]=0]]]]; For[lst={}; n=1, n<=7, n++, s=Table[{}, {2n}]; For[i=1, i<=2n, i++, For[j=1, j<=2n, j++, If[i!=j&& Plus@@Last/@FactorInteger [i+j]==2, AppendTo[s[[i]], j]]]]; soln=Table[0, {2n}]; soln[[1]]=1; cnt=0; try[2]; AppendTo[lst, cnt]]; lst %Y A253202 Cf. A051252. %K A253202 nonn,more %O A253202 1,4 %A A253202 _Michel Lagneau_, Mar 25 2015