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-7 of 7 results.

A051252 Number of essentially different ways of arranging numbers 1 through 2n around a circle so that sum of each pair of adjacent numbers is prime.

Original entry on oeis.org

1, 1, 1, 2, 48, 512, 1440, 40512, 385072, 3154650, 106906168, 3197817022, 82924866213, 4025168862425, 127854811616691
Offset: 1

Views

Author

Keywords

Comments

Jud McCranie reports that he was able to find a solution for each n <= 225 (2n <= 450) in just a few seconds. - Jul 05 2002
Is there a proof that this can always be done?
The Mathematica program for this sequence uses backtracking to find all solutions for a given n. To verify that at least one solution exists for a given n, the backtracking function be made to stop when the first solution is found. Solutions have been found for n <= 48. - T. D. Noe, Jun 19 2002
This sequence is from the prime circle problem. There is no known proof that a(n) > 0 for all n. However, for many n (see A072618 and A072676), we can prove that a(n) > 0. Also, the sequence A072616 seems to imply that there are always solutions in which the odd (or even) numbers are in order around the circle. - T. D. Noe, Jul 01 2002
Prime circles can apparently be generated for any n using the Mathematica programs given in A072676 and A072184. - T. D. Noe, Jul 08 2002
The following seems to always produce a solution: Work around the circle starting with 1 but after that always choosing the largest remaining number that fits. For example, if n = 4 this gives 1, 6, 7, 4, 3, 8, 5, 2. See A088643 for a sequence on a related idea. - Paul Boddington, Oct 30 2007
See A228917 for a similar conjecture on twin primes. - Zhi-Wei Sun, Sep 08 2013
See A242527 for a similar problem on the set of numbers {0 through (n-1)}. - Stanislav Sykora, May 30 2014
James Tilley and Stan Wagon report that all terms up to n = 10^6 are nonzero. Charles R Greathouse IV, Feb 05 2016

Examples

			One arrangement for 2n=6 is 1,4,3,2,5,6 and this is essentially unique, so a(3)=1.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, second edition, Springer, 1994. See section C1.

Crossrefs

Programs

  • Mathematica
    $RecursionLimit=500; try[lev_] := Module[{t, j}, If[lev>2n, (*then make sure the sum of the first and last is prime*) If[PrimeQ[soln[[1]]+soln[[2n]]]&&soln[[2]]<=soln[[2n]], (*Print[soln]; *) cnt++ ], (*else append another number to the soln list*) t=soln[[lev-1]]; For[j=1, j<=Length[s[[t]]], j++, If[ !MemberQ[soln, s[[t]][[j]]], soln[[lev]]=s[[t]][[j]]; try[lev+1]; soln[[lev]]=0]]]]; For[lst={}; n=1, n<=7, n++, s=Table[{}, {2n}]; For[i=1, i<=2n, i++, For[j=1, j<=2n, j++, If[i!=j&&PrimeQ[i+j], AppendTo[s[[i]], j]]]]; soln=Table[0, {2n}]; soln[[1]]=1; cnt=0; try[2]; AppendTo[lst, cnt]]; lst (* T. D. Noe *)

Extensions

a(14)-a(15) from Max Alekseyev, Sep 19 2013

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

Original entry on oeis.org

1, 1, 1, 1, 5, 9, 17, 84, 30, 127, 791, 2404, 11454, 27680, 25942, 137272, 515947, 2834056, 26583034, 82099932, 306004652, 4518630225, 11242369312, 8942966426, 95473633156, 533328765065
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 09 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
Note that if i-j = (p-1)/2 and i+j = (q-1)/2 for some odd primes p and q then 4*i+2 is the sum of the two primes p and q. So the conjecture is related to Goldbach's conjecture.
Zhi-Wei Sun also made the following similar conjecture: For any integer n > 5, there exists a circular permutation i_0, i_1, ..., i_n of 0, 1, ..., n such that all the 2*n+2 numbers 2*|i_k-i_{k+1}|+1 and 2*(i_k+i_{k+1})-1 (k = 0,...,n) (with i_{n+1} = i_0) are primes.

Examples

			a(n) = 1 for n = 1,2,3 due to the natural circular permutation (0,...,n).
a(4) = 1 due to the circular permutation (0,1,4,2,3).
a(5) = 5 due to the circular permutations (0,1,2,4,5,3), (0,1,4,2,3,5), (0,1,4,5,3,2), (0,2,1,4,5,3), (0,3,2,1,4,5).
a(6) = 9 due to the circular permutations
  (0,1,2,4,5,3,6), (0,1,2,4,5,6,3), (0,1,4,2,3,5,6),
  (0,1,4,2,3,6,5), (0,1,4,5,6,3,2), (0,2,1,4,5,3,6),
  (0,2,1,4,5,6,3), (0,3,2,1,4,5,6), (0,5,4,1,2,3,6).
a(7) = 17 due to the circular permutations
  (0,1,2,7,4,5,3,6), (0,1,2,7,4,5,6,3), (0,1,4,7,2,3,5,6),
  (0,1,4,7,2,3,6,5), (0,1,7,2,4,5,3,6), (0,1,7,2,4,5,6,3),
  (0,1,7,4,2,3,5,6), (0,1,7,4,2,3,6,5), (0,1,7,4,5,6,3,2),
  (0,2,1,7,4,5,3,6), (0,2,1,7,4,5,6,3), (0,2,7,1,4,5,3,6),
  (0,2,7,1,4,5,6,3), (0,3,2,1,7,4,5,6), (0,3,2,7,1,4,5,6),
  (0,5,4,1,7,2,3,6), (0,5,4,7,1,2,3,6).
		

Crossrefs

Programs

  • Mathematica
    (* 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,3,5,4,7,2,1) is identical to (0,1,2,7,4,5,3,6) if we ignore direction. Thus a(7) is half of the number of circular permutations yielded by this program. *)
    p[i_,j_]:=PrimeQ[2*Abs[i-j]+1]&&PrimeQ[2(i+j)+1]
    V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
    m=0
    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!}]

Extensions

a(10)-a(26) from Max Alekseyev, Sep 17 2013

A228886 Number of permutations i_0,i_1,...,i_n of 0,1,...,n with i_0 = 0 and i_n = n, and with i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 all coprime to both n-1 and n+1.

Original entry on oeis.org

1, 0, 1, 0, 1, 8, 3, 24, 78, 1164, 34, 4021156, 400, 87180, 2499480, 7509358, 1700352, 39982182134232, 1427688, 212987263960, 9533487948, 36638961135462, 29317847040, 30258969747586970112, 1655088666624
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 07 2013

Keywords

Comments

Conjecture: a(n) > 0 except for n = 2, 4.
Note that this conjecture is stronger than the one stated in the comments in A228860. Also, there is no permutation i_0, ..., i_7 of 0, ..., 7 with i_0+i_1, i_1+i_2, ..., i_6+i_7, i_7+i_0 all coprime to 7*13 - 1 = 90.
For n > 1 let S(n) be an undirected simple graph with vertices 0, 1, ..., n which has an edge connecting two distinct vertices i and j if and only if i + j is relatively prime to both n-1 and n+1. Then a(n) is just the number of those Hamiltonian cycles in S(n) on which the vertices 0 and n are adjacent.
We have some other similar conjectures. For example, for any positive integer n there is a permutation i_0,i_1,...,i_n of 0,1,...,n with i_0 = 0 and i_n = n such that i_0 + i_1, i_1 + i_2, ..., i_{n-1} + i_n, i_n + i_0 are all relatively prime to both 2*n-1 and 2*n+1.
On Sep 10 2013, Zhi-Wei Sun proved the conjecture for any positive odd integer n. In fact, if n == 1 or 3 (mod 6) then we may take the permutation 0,n-2,2,n-4,4,...,1,n-1,n which meets the requirement; if n == 3 or 5 (mod 6) then the permutation 0,1,n-1,3,n-3,...,n-2,2,n suffices for our purpose.

Examples

			a(2) = 0 since 1+2 = 2^2-1.
a(3) = 1 due to the identical permutation (0,1,2,3).
a(4) = 0 since 1+2 divides 4^2-1.
a(5) = 1 due to the permutation (0,1,4,3,2,5).
a(6) = 8 due to the permutations
  (0,1,2,4,5,3,6), (0,1,3,5,4,2,6),
  (0,2,4,5,1,3,6), (0,3,1,2,4,5,6),
  (0,3,1,5,4,2,6), (0,4,2,1,3,5,6),
  (0,4,2,1,5,3,6), (0,4,5,3,1,2,6).
a(7) = 3 due to the permutations(0,1,4,3,2,5,6,7), (0,1,6,5,2,3,4,7), (0,5,2,3,4,1,6,7).
a(8) > 0 due to the permutation (0,1,4,7,3,2,6,5,8).
a(9) > 0 due to the permutation (0,1,2,5,4,7,6,3,8,9).
a(10) > 0 due to the permutation (0,1,3,2,5,8,6,4,9,7,10).
		

Crossrefs

Programs

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

Extensions

a(11)-a(25) from Max Alekseyev, Sep 13 2013

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.

Original entry on oeis.org

1, 0, 1, 0, 1, 6, 3, 16, 18, 122, 97, 2725, 26457, 10615, 367132, 158738, 1356272, 72423339
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 10 2013

Keywords

Comments

Conjecture: a(n) > 0 except for n = 2, 4.

Examples

			a(1) = 1 due to the circular permutation (0,1).
a(2) = 0 since 2*2^2+1 is composite.
a(3) = 1 due to the circular permutation (0,1,2,3).
a(4) = 0 since 2*(4^2-k^2)+1 is composite for any k = 0,2,3.
a(5) = 1 due to the circular permutation (0,1,4,5,2,3).
a(6) = 6 due to the circular permutations
  (0,1,3,2,5,4,6), (0,1,4,6,5,2,3), (0,1,6,4,5,2,3),
  (0,3,1,2,5,4,6), (0,3,2,1,4,5,6), (0,3,2,5,4,1,6).
a(7) = 3 due to the circular permutations
  (0,1,7,4,6,5,2,3), (0,3,2,1,7,4,5,6), (0,3,2,5,4,7,1,6).
a(8) = 16 due to the circular permutations
  (0,1,3,2,5,8,7,4,6), (0,1,6,4,7,8,5,2,3),
  (0,1,7,8,4,6,5,2,3), (0,1,8,7,4,6,5,2,4),
  (0,3,1,2,5,8,7,4,6), (0,3,2,1,4,7,8,5,6),
  (0,3,2,1,7,4,8,5,6), (0,3,2,1,7,8,4,5,6),
  (0,3,2,1,7,8,5,4,6), (0,3,2,1,8,7,4,5,6),
  (0,3,2,5,4,7,8,1,6), (0,3,2,5,4,8,7,1,6),
  (0,3,2,5,8,1,7,4,6), (0,3,2,5,8,4,7,1,6),
  (0,3,2,5,8,7,1,4,6), (0,3,2,5,8,7,4,1,6).
a(9) > 0 due to the permutation (0,3,2,1,6,4,7,8,5,9).
a(10) > 0  due to the permutation (0,9,5,6,4,7,8,10,2,3,1).
		

Crossrefs

Programs

  • Mathematica
    (* 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. *)
    p[i_,j_]:=PrimeQ[2*Abs[i^2-j^2]+1]
    V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
    m=0
    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!}]

Extensions

a(10)-a(18) from Alois P. Heinz, Sep 10 2013

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

Original entry on oeis.org

1, 1, 1, 0, 2, 3, 7, 11, 9, 5, 41, 82, 254, 2412, 9524, 13925, 85318, 220818, 1662421, 10496784, 20690118, 97200566, 460358077
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 13 2013

Keywords

Comments

Conjecture: a(n) > 0 except for n = 4.
Note that if a circular permutation i_0, i_1, ..., i_n of 0, 1, ..., n with i_0 = 0 meets the requirement then we must have i_n = 1. This can be explained as follows: If i_n > 1, then 3 | i_n since 2*(i_n^2+0)+1 is a prime not divisible by 3, and similarly i_{n-1},...,i_1 are also multiples of 3 since 2*(i_{n-1}^2+i_n)+1, ..., 2*(i_1^2+i_2)+1 are primes not divisible by 3. Therefore, i_n > 1 would lead to a contradiction.

Examples

			a(1) = 1 due to the circular permutation (0,1).
a(2) = 1 due to the circular permutation (0,2,1).
a(3) = 1 due to the circular permutation (0,3,2,1).
a(5) = 2 due to the circular permutations
   (0,3,2,4,5,1) and (0,3,5,4,2,1).
a(6) = 3 due to the circular permutations
   (0,3,6,5,4,2,1), (0,6,3,2,4,5,1), (0,6,3,5,4,2,1).
a(7) = 7 due to the circular permutations
   (0,3,6,5,4,2,7,1), (0,3,6,5,4,7,2,1), (0,6,3,2,4,7,5,1),
   (0,6,3,2,5,4,7,1), (0,6,3,2,7,4,5,1), (0,6,3,5,4,2,7,1),
   (0,6,3,5,4,7,2,1).
a(8) = 11 due to the circular permutations
   (0,3,6,5,8,4,2,7,1), (0,3,6,5,8,4,7,2,1),
   (0,3,6,8,4,2,7,5,1), (0,4,6,8,4,7,2,5,1),
   (0,3,6,8,5,4,2,7,1), (0,3,6,8,5,4,7,2,1),
   (0,6,3,2,4,7,5,8,1), (0,6,3,2,5,8,4,7,1),
   (0,6,3,2,7,4,5,8,1), (0,6,3,5,8,4,2,7,1),
   (0,6,3,5,8,4,7,2,1).
a(9) = 9 due to the circular permutations
   (0,6,3,9,2,4,7,5,8,1), (0,6,3,9,2,5,8,4,7,1),
   (0,6,3,9,2,7,4,5,8,1), (0,6,3,9,5,8,4,2,7,1),
   (0,6,3,9,5,8,4,7,2,1), (0,6,3,9,8,4,2,7,5,1),
   (0,6,3,9,8,4,7,2,5,1), (0,6,3,9,8,5,4,2,7,1),
   (0,6,3,9,8,5,4,7,2,1).
a(20) > 0 due to the circular permutation
  (0,3,12,9,15,18,6,20,19,14,13,4,2,7,16,17,11,10,5,8,1).
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute required circular permutations for n = 7. *)
    p[i_,j_]:=tp[i,j]=PrimeQ[2(i^2+j)+1]
    V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
    m=0
    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!}]

Extensions

a(10)-a(23) from Alois P. Heinz, Sep 13 2013

A229130 Number of permutations i_0, i_1, ..., i_n of 0, 1, ..., n with i_0 = 0 and i_n = n such that the n+1 numbers i_0^2+i_1, i_1^2+i_2, ..., i_{n-1}^2+i_n, i_n^2+i_0 are all relatively prime to both n-1 and n+1.

Original entry on oeis.org

1, 0, 1, 1, 0, 6, 3, 42, 68, 2794, 0, 5311604, 478, 57009, 2716452, 10778632, 207360, 39187872956340, 106144, 26869397610, 11775466120, 22062519153360, 559350576, 29991180449906858400, 257272815600, 12675330087321600, 52248156883498208
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 15 2013

Keywords

Comments

Conjecture: a(n) > 0 except for n = 2, 5, 11. Similarly, for any positive integer n not equal to 4, there is a permutation i_0, i_1, ..., i_n of 0, 1, ..., n with i_0 = 0 and i_n = n such that the n+1 numbers i_0^2-i_1, i_1^2-i_2, ..., i_{n-1}^2-i_n, i_n^2-i_0 are all coprime to both n-1 and n+1.
Zhi-Wei Sun also made the following general conjecture:
For any positive integer k, define E(k) to be the set of those positive integers n for which there is no permutation i_0, i_1, ..., i_n of 0, 1, ..., n with i_0 = 0 and i_n = n such that all the n+1 numbers i_0^k+i_1, i_1^k+i_2, ..., i_{n-1}^k+i_n, i_n^k+i_0 are coprime to both n-1 and n+1. Then E(k) is always finite; in particular, E(1) = {2,4}, E(2) = {2,5,11} and E(3) = {2,4}.

Examples

			a(3) = 1 due to the permutation (i_0,i_1,i_2,i_3)=(0,1,2,3).
a(4) = 1 due to the permutation (0,1,3,2,4).
a(6) = 1 due to the permutations
  (0,1,3,2,5,4,6), (0,1,3,4,2,5,6), (0,2,5,1,3,4,6),
  (0,3,2,4,1,5,6), (0,3,4,1,2,5,6), (0,4,1,3,2,5,6).
a(7) = 3 due to the permutations
  (0,1,6,5,4,3,2,7), (0,5,4,3,2,1,6,7), (0,5,6,1,4,3,2,7).
a(8) > 0 due to the permutation (0,2,1,4,6,5,7,3,8).
a(9) > 0 due to the permutation (0,1,2,3,4,5,6,7,8,9).
a(10) > 0 due to the permutation (0,1,3,5,4,7,9,8,6,2,10).
a(11) = 0 since 6 is the unique i among 0,...,11 with i^2+5 coprime to 11^2-1, and it is also the unique j among 1,...,10 with j^2+11 coprime to 11^2-1.
		

Crossrefs

Programs

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

Extensions

a(12)-a(17) from Alois P. Heinz, Sep 15 2013
a(19) and a(23) from Alois P. Heinz, Sep 16 2013
a(18), a(20)-a(22) and a(24)-a(27) from Bert Dobbelaere, Feb 18 2020

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
Showing 1-7 of 7 results.