login
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.
4

%I #40 Aug 04 2019 08:46:31

%S 1,0,0,3,1,0,0,1,41,72

%N 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.

%C Conjecture: a(n) > 0 if 2*n+1 is a prime greater than 13.

%C When p = 2*n+1 > 13 is a prime, the conjecture indicates that there is a numbering a_1, a_2, ..., a_n of all the (p-1)/2 = n quadratic residues modulo p such that all the n adjacent sums a_1+a_2, a_2+a_3, ..., a_{n-1}+a_n, a_n+a_1 are also quadratic residues modulo p.

%C Zhi-Wei Sun also made the following conjecture:

%C (1) If p = 2*n+1 > 13 is a prime, then there is a circular permutation a_1, a_2, ..., a_n of all the (p-1)/2 = n quadratic residues modulo p such that all the n adjacent sums a_1+a_2, a_2+a_3, ..., a_{n-1}+a_n, a_n+a_1 are quadratic nonresidues modulo p.

%C (2) For any prime p = 2*n+1 > 5, there is a circular permutation a_1, a_2, ..., a_n of all the (p-1)/2 = n quadratic residues modulo p such that all the n adjacent differences a_1-a_2, a_2-a_3, ..., a_{n-1}-a_n, a_n-a_1 are quadratic residues (or quadratic nonresidues) modulo p.

%C Noga Alon has confirmed this conjecture.

%C See also A229878 for a stronger conjecture which remains open.

%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1309.1679">Some new problems in additive combinatorics</a>, preprint, arXiv:1309.1679 [math.NT], 2013-2014.

%e a(4) = 3 due to the circular permutations

%e (1,2,3,4), (1,2,4,3), (1,3,2,4).

%e a(5) = 1 due to the circular permutation (1,2,4,3,5).

%e a(8) = 1 due to the circular permutation (1,5,8,6,4,3,2,7).

%e a(9) > 0 due to the circular permutation (1,2,4,3,8,6,5,7,9).

%e a(10) > 0 due to the circular permutation

%e (1, 2, 4, 3, 7, 9, 5, 10, 8, 6).

%e a(11) > 0 due to the circular permutation

%e (1, 5, 2, 3, 4, 10, 8, 11, 7, 6, 9).

%e a(12) > 0 due to the circular permutation

%e (1, 10, 2, 3, 8, 7, 12, 5, 11, 6, 4, 9).

%t (* 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. *)

%t f[i_,j_,n_]:=JacobiSymbol[i^2+j^2,n]==1

%t V[i_]:=Part[Permutations[{2,3,4,5,6,7,8,9}],i]

%t m=0

%t 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}];

%t 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!}]

%Y Cf. A229005, A229878.

%K nonn,more,hard

%O 1,4

%A _Zhi-Wei Sun_, Sep 11 2013