A229232 Number of undirected circular permutations pi(1), ..., pi(n) of 1, ..., n with the n numbers pi(1)*pi(2)-1, pi(2)*pi(3)-1, ..., pi(n-1)*pi(n)-1, pi(n)*pi(1)-1 all prime.
0, 0, 0, 1, 0, 2, 1, 2, 2, 8, 2, 241, 0, 693, 376, 7687, 1082, 127563, 25113, 1353842, 559649
Offset: 1
Examples
a(4) = 1 due to the circular permutation (1,3,2,4). a(6) = 2 due to the circular permutations (1,3,2,4,5,6) and (1,3,2,6,5,4). a(7) = 1 due to the circular permutation (1,3,2,7,6,5,4). a(8) = 2 due to the circular permutations (1,3,2,7,6,5,4,8) and (1,4,5,6,7,2,3,8). a(9) = 2 due to the circular permutations (1,3,4,5,6,7,2,9,8) and (1,3,8,9,2,7,6,5,4). a(10) = 8 due to the circular permutations (1,3,4,5,6,7,2,9,10,8), (1,3,4,5,6,7,2,10,9,8), (1,3,8,9,10,2,7,6,5,4), (1,3,8,10,9,2,7,6,5,4), (1,3,10,8,9,2,7,6,5,4), (1,3,10,9,2,7,6,5,4,8), (1,4,5,6,7,2,3,10,9,8), (1,4,5,6,7,2,9,10,3,8). a(13) = 0 since 8 is the unique j among 1, ..., 12 with 13*j-1 prime.
Links
- Zhi-Wei Sun, Some new problems in additive combinatorics, preprint, arXiv:1309.1679 [math.NT], 2013-2014.
Programs
-
Mathematica
(* A program to compute required circular permutations for n = 8. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction; for example, (1,8,4,5,6,7,2,3) is identical to (1,3,2,7,6,5,4,8) if we ignore direction. Thus, a(8) is half of the number of circular permutations yielded by this program. *) V[i_]:=V[i]=Part[Permutations[{2,3,4,5,6,7,8}],i] f[i_,j_]:=f[i,j]=PrimeQ[i*j-1] m=0 Do[Do[If[f[If[j==0,1,Part[V[i],j]],If[j<7,Part[V[i],j+1],1]]==False,Goto[aa]],{j,0,7}]; m=m+1;Print[m,":"," ",1," ",Part[V[i],1]," ",Part[V[i],2]," ",Part[V[i],3]," ",Part[V[i],4]," ",Part[V[i],5]," ",Part[V[i],6]," ",Part[V[i],7]];Label[aa];Continue,{i,1,7!}]
Extensions
a(11)-a(21) from Pontus von Brömssen, Jan 08 2025
Comments