A229878 Number of undirected circular permutations tau(1), ..., tau((p_n-1)/2) of 1, ..., (p_n-1)/2 such that the (p_n-1)/2 numbers tau(1)^2 + tau(2)^2, tau(2)^2 + tau(3)^2, ..., tau((p_n-3)/2)^2 + tau((p_n-1)/2)^2, tau((p_n-1)/2)^2 + tau(1)^2 give all the (p_n-1)/2 quadratic residues modulo p_n, where p_n is the n-th prime.
0, 0, 1, 0, 1, 2
Offset: 3
Examples
a(5) = 1 due to the circular permutation (1,2,4,3,5). Note that 1^2+2^2, 2^2+4^2, 4^2+3^2, 3^2+5^2, 5^2+1^2 give the 5 quadratic residues modulo p_5 = 11. a(7) = 1 due to the circular permutation (1,5,8,6,4,3,2,7). a(8) = 2 due to the circular permutations (1,2,4,8,3,6,7,5,9) and (1,4,3,7,9,2,8,6,5).
Links
- Zhi-Wei Sun, Some new problems in additive combinatorics, preprint, arXiv:1309.1679 [math.NT], 2013-2014.
Crossrefs
Cf. A229038.
Programs
-
Mathematica
(* A program to compute required circular permutations for n = 8. Note that p_8 = 19. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction. Thus a(8) is half of the number of circular permutations yielded by this program. *) V[i_]:=Part[Permutations[{2,3,4,5,6,7,8,9}],i] m=0 Do[If[Union[Table[Mod[If[j==0,1,Part[V[i],j]]^2+If[j<8,Part[V[i],j+1],1]^2,19],{j,0,8}]]!=Union[Table[Mod[k^2,19],{k,1,9}]],Goto[aa]]; 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