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.

Showing 1-2 of 2 results.

A229232 Number of undirected circular permutations pi(1), ..., pi(n) of 1, ..., n with the n numbers pi(1)*pi(2)-1, pi(2)*pi(3)-1, ..., pi(n-1)*pi(n)-1, pi(n)*pi(1)-1 all prime.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 2, 2, 8, 2, 241, 0, 693, 376, 7687, 1082, 127563, 25113, 1353842, 559649
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 16 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5 with n not equal to 13.
Zhi-Wei Sun also made the following conjectures:
(1) For any integer n > 1, there is a permutation pi(1), ..., pi(n) of 1, ..., n such that the n numbers 2*pi(1)*pi(2)-1, ..., 2*pi(n-1)*pi(n)-1, 2*pi(n)*pi(1)-1 are all prime. Also, for any positive integer n not equal to 4, there is a permutation pi(1), ..., pi(n) of 1, ..., n such that the n numbers 2*pi(1)*pi(2)+1, ..., 2*pi(n-1)*pi(n)+1, 2*pi(n)*pi(1)+1 are all prime.
(2) Let F be a finite field with q > 7 elements. Then, there is a circular permutation a_1,...,a_{q-1} of the q-1 nonzero elements of F such that all the q-1 elements a_1*a_2-1, a_2*a_3-1, ..., a_{q-2}*a_{q-1}-1, a_{q-1}*a_1-1 are primitive elements of the field F (i.e., generators of the multiplicative group F\{0}). Also, there is a circular permutation b_1,...,b_{q-1} of the q-1 nonzero elements of F such that all the q-1 elements b_1*b_2+1, b_2*b_3+1, ..., b_{q-2}*b_{q-1}+1, b_{q-1}*b_1+1 are primitive elements of the field F.

Examples

			a(4) = 1 due to the circular permutation (1,3,2,4).
a(6) = 2 due to the circular permutations
   (1,3,2,4,5,6) and (1,3,2,6,5,4).
a(7) = 1 due to the circular permutation (1,3,2,7,6,5,4).
a(8) = 2 due to the circular permutations
   (1,3,2,7,6,5,4,8) and (1,4,5,6,7,2,3,8).
a(9) = 2 due to the circular permutations
   (1,3,4,5,6,7,2,9,8) and (1,3,8,9,2,7,6,5,4).
a(10) = 8 due to the circular permutations
   (1,3,4,5,6,7,2,9,10,8), (1,3,4,5,6,7,2,10,9,8),
   (1,3,8,9,10,2,7,6,5,4), (1,3,8,10,9,2,7,6,5,4),
   (1,3,10,8,9,2,7,6,5,4), (1,3,10,9,2,7,6,5,4,8),
   (1,4,5,6,7,2,3,10,9,8), (1,4,5,6,7,2,9,10,3,8).
a(13) = 0 since 8 is the unique j among 1, ..., 12 with 13*j-1 prime.
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute required circular permutations for n = 8. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction; for example, (1,8,4,5,6,7,2,3) is identical to (1,3,2,7,6,5,4,8) if we ignore direction. Thus, a(8) is half of the number of circular permutations yielded by this program. *)
    V[i_]:=V[i]=Part[Permutations[{2,3,4,5,6,7,8}],i]
    f[i_,j_]:=f[i,j]=PrimeQ[i*j-1]
    m=0
    Do[Do[If[f[If[j==0,1,Part[V[i],j]],If[j<7,Part[V[i],j+1],1]]==False,Goto[aa]],{j,0,7}];
    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]];Label[aa];Continue,{i,1,7!}]

Extensions

a(11)-a(21) from Pontus von Brömssen, Jan 08 2025

A229827 Number of circular permutations i_1,...,i_n of 1,...,n such that the n numbers i_1^2+i_2, i_2^2+i_3, ..., i_{n-1}^2+i_n, i_n^2+i_1 form a complete system of residues modulo n.

Original entry on oeis.org

0, 0, 0, 4, 0, 24, 0, 0, 0, 5308, 0, 123884, 0, 0, 0, 147288372, 0, 7238567052, 0, 0, 0
Offset: 2

Views

Author

Zhi-Wei Sun, Sep 30 2013

Keywords

Comments

Conjecture: (i) a(p) > 0 for any prime p > 3. Moreover, for any finite field F(q) with q elements and a polynomial P(x) over F(q) of degree smaller than q-1, if P(x) is not of the form c-x, then there is a circular permutation a_1, ..., a_q of all the elements of F(q) with
{P(a_1)+a_2, P(a_2)+a_3, ..., P(a_{q-1})+a_q, P(a_q)+a_1}
equal to F(q).
(ii) Let F be any field with |F| > 7, and let A be a finite subset of F with |A| = n > 2. Let P(x) be a polynomial over F whose degree is smaller than p-1 if F is of prime characteristic p. If P(x) is not of the form c-x, then there is a circular permutation a_1, ..., a_n of all the elements of A such that the n sums P(a_1)+a_2, P(a_2)+a_3, ..., P(a_{n-1})+a_n, P(a_n)+a_1 are pairwise distinct.
Clearly, if a(n) > 0, then we must have 1^2+2^2+...+n^2 == 0 (mod n), i.e., (n+1)*(2n+1) == 0 (mod 6). Thus, when n is divisible by 2 or 3, we must have a(n) = 0.
It is well known that for any finite field F(q) with q elements we have sum_{x in F(q)} x^k = 0 for every k = 0, ..., q-2.
Verified for n < 256: a(n) > 0 iff n is not divisible by 2 or 3. - Bert Dobbelaere, Apr 23 2021

Examples

			a(5) = 4 due to the circular permutations
    (1,3,4,5,2), (1,4,2,3,5), (1,5,2,4,3), (1,5,4,2,3).
a(7) > 0 due to the circular permutation (1,2,3,7,4,6,5).
a(11) > 0 due to the circular permutation
    (1,2,3,4,6,5,9,11,10,8,7).
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute desired circular permutations for n = 7. *)
      V[i_]:=Part[Permutations[{2,3,4,5,6,7}],i]
    m=0
    Do[If[Length[Union[Table[Mod[If[j==0,1,Part[V[i],j]]^2+If[j<6,Part[V[i],j+1],1],7],{j,0,6}]]]<7,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]];Label[aa];Continue,{i,1,6!}]

Extensions

a(11)-a(22) from Bert Dobbelaere, Apr 23 2021
Showing 1-2 of 2 results.