cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A229005 Number of undirected circular permutations i_0, i_1, ..., i_n of 0, 1, ..., n such that all the n+1 numbers |i_0^2-i_1^2|, |i_1^2-i_2^2|, ..., |i_{n-1}^2-i_n^2|, |i_n^2-i_0^2| are of the form (p-1)/2 with p an odd prime.

This page as a plain text file.
%I A229005 #20 Aug 04 2019 05:53:26
%S A229005 1,0,1,0,1,6,3,16,18,122,97,2725,26457,10615,367132,158738,1356272,
%T A229005 72423339
%N A229005 Number of undirected circular permutations i_0, i_1, ..., i_n of 0, 1, ..., n such that all the n+1 numbers |i_0^2-i_1^2|, |i_1^2-i_2^2|, ..., |i_{n-1}^2-i_n^2|, |i_n^2-i_0^2| are of the form (p-1)/2 with p an odd prime.
%C A229005 Conjecture: a(n) > 0 except for n = 2, 4.
%H A229005 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 A229005 a(1) = 1 due to the circular permutation (0,1).
%e A229005 a(2) = 0 since 2*2^2+1 is composite.
%e A229005 a(3) = 1 due to the circular permutation (0,1,2,3).
%e A229005 a(4) = 0 since 2*(4^2-k^2)+1 is composite for any k = 0,2,3.
%e A229005 a(5) = 1 due to the circular permutation (0,1,4,5,2,3).
%e A229005 a(6) = 6 due to the circular permutations
%e A229005   (0,1,3,2,5,4,6), (0,1,4,6,5,2,3), (0,1,6,4,5,2,3),
%e A229005   (0,3,1,2,5,4,6), (0,3,2,1,4,5,6), (0,3,2,5,4,1,6).
%e A229005 a(7) = 3 due to the circular permutations
%e A229005   (0,1,7,4,6,5,2,3), (0,3,2,1,7,4,5,6), (0,3,2,5,4,7,1,6).
%e A229005 a(8) = 16 due to the circular permutations
%e A229005   (0,1,3,2,5,8,7,4,6), (0,1,6,4,7,8,5,2,3),
%e A229005   (0,1,7,8,4,6,5,2,3), (0,1,8,7,4,6,5,2,4),
%e A229005   (0,3,1,2,5,8,7,4,6), (0,3,2,1,4,7,8,5,6),
%e A229005   (0,3,2,1,7,4,8,5,6), (0,3,2,1,7,8,4,5,6),
%e A229005   (0,3,2,1,7,8,5,4,6), (0,3,2,1,8,7,4,5,6),
%e A229005   (0,3,2,5,4,7,8,1,6), (0,3,2,5,4,8,7,1,6),
%e A229005   (0,3,2,5,8,1,7,4,6), (0,3,2,5,8,4,7,1,6),
%e A229005   (0,3,2,5,8,7,1,4,6), (0,3,2,5,8,7,4,1,6).
%e A229005 a(9) > 0 due to the permutation (0,3,2,1,6,4,7,8,5,9).
%e A229005 a(10) > 0  due to the permutation (0,9,5,6,4,7,8,10,2,3,1).
%t A229005 (* A program to compute required circular permutations for n = 7. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction; for example, (0,6,1,7,4,5,2,3) is identical to (0,3,2,5,4,7,1,6) if we ignore direction. Thus a(7) is half of the number of circular permutations yielded by this program. *)
%t A229005 p[i_,j_]:=PrimeQ[2*Abs[i^2-j^2]+1]
%t A229005 V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
%t A229005 m=0
%t A229005 Do[Do[If[p[If[j==0,0,Part[V[i],j]],If[j<7,Part[V[i],j+1],0]]==False,Goto[aa]],{j,0,7}];m=m+1;Print[m,":"," ",0," ",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!}]
%Y A229005 Cf. A000040, A051252, A228917, A228956, A228886.
%K A229005 nonn,more,hard
%O A229005 1,6
%A A229005 _Zhi-Wei Sun_, Sep 10 2013
%E A229005 a(10)-a(18) from _Alois P. Heinz_, Sep 10 2013