A229038 Number of undirected circular permutations i_1, ..., i_n of 1, ..., n such that all the n sums i_1^2+i_2^2, ..., i_{n-1}^2+i_n^2, i_n^2+i_1^2 are among those integers m with the Jacobi symbol (m/(2*n+1)) equal to 1.
1, 0, 0, 3, 1, 0, 0, 1, 41, 72
Offset: 1
Examples
a(4) = 3 due to the circular permutations (1,2,3,4), (1,2,4,3), (1,3,2,4). a(5) = 1 due to the circular permutation (1,2,4,3,5). a(8) = 1 due to the circular permutation (1,5,8,6,4,3,2,7). a(9) > 0 due to the circular permutation (1,2,4,3,8,6,5,7,9). a(10) > 0 due to the circular permutation (1, 2, 4, 3, 7, 9, 5, 10, 8, 6). a(11) > 0 due to the circular permutation (1, 5, 2, 3, 4, 10, 8, 11, 7, 6, 9). a(12) > 0 due to the circular permutation (1, 10, 2, 3, 8, 7, 12, 5, 11, 6, 4, 9).
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 = 9. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction; for example, the circular permutation (1,9,7,5,6,8,3,4,2) is identical to (1,2,4,3,8,6,5,7,9) if we ignore direction. Thus a(9) is half of the number of circular permutations yielded by this program. *) f[i_,j_,n_]:=JacobiSymbol[i^2+j^2,n]==1 V[i_]:=Part[Permutations[{2,3,4,5,6,7,8,9}],i] m=0 Do[Do[If[f[If[j==0,1,Part[V[i],j]],If[j<8,Part[V[i],j+1],1],19]==False,Goto[aa]],{j,0,8}]; 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]," ",Part[V[i],8]];Label[aa];Continue,{i,1,8!}]
Comments