%I #9 Jul 16 2021 10:09:07
%S 0,0,0,2,17,16,209,3192
%N Number of permutations f of {1,...,n} with f(n) = n and f(n-1) > f(1) such that f(1)*f(2) + ... + f(n-1)*f(n) + f(n)*f(1) == 0 (mod n^2).
%C Conjecture: a(n) > 0 for all n > 5.
%e a(6) = 2, and 2*4 + 4*1 + 1*3 + 3*5 + 5*6 + 6*2 = 3*5 + 5*1 + 1*2 + 2*4 + 4*6 + 6*3 = 2*6^2.
%e a(7) > 0 with 1*3 + 3*4 + 4*5 + 5*6 + 6*2 + 2*7 + 7*1 = 2*7^2.
%e a(8) > 0 with 1*5 + 5*3 + 3*6 + 6*4 + 4*7 + 7*2 + 2*8 + 8*1 = 2*8^2.
%e a(9) > 0 with 1*2 + 2*3 + 3*5 + 5*4 + 4*6 + 6*8 + 8*7 + 7*9 + 9*1 = 3*9^2.
%e a(10) > 0 with 1*2 + 2*3 + 3*6 + 6*8 + 8*4 + 4*9 + 9*7 + 7*5 + 5*10 + 10*1 = 3*10^2.
%e a(11) > 0 with 1*3 + 3*4 + 4*5 + 5*8 + 8*6 + 6*9 + 9*7 + 7*10 + 10*2 + 2*11 + 11*1 = 3*11^2.
%t (* A program to compute a(7): *)
%t VV[i_]:=VV[i]=Part[Permutations[{1,2,3,4,5,6}],i];
%t n=0;Do[If[VV[i][[1]]<VV[i][[6]]&&Mod[Sum[VV[i][[k]]*VV[i][[k+1]],{k,1,5}]+VV[i][[6]]*7+7*VV[i][[1]],7^2]==0,n=n+1],{i,1,6!}];Print[n]
%Y Cf. A000290, A322070, A322099, A342965, A346387.
%K nonn,more
%O 3,4
%A _Zhi-Wei Sun_, Jul 15 2021
|