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

A228917 Number of undirected circular permutations i_0, i_1, ..., i_n of 0, 1, ..., n such that i_0+i_1, i_1+i_2, ...,i_{n-1}+i_n, i_n+i_0 are among those k with 6*k-1 and 6*k+1 twin primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 2, 12, 39, 98, 526, 2117, 6663, 15043, 68403, 791581, 4826577, 19592777, 102551299, 739788968, 4449585790, 36547266589, 324446266072, 2743681178070
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 08 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This implies the twin prime conjecture, and it is similar to the prime circle problem mentioned in A051252.
For each n = 2,3,... construct an undirected simple graph T(n) with vertices 0,1,...,n which has an edge connecting two distinct vertices i and j if and only if 6*(i+j)-1 and 6*(i+j)+1 are twin primes. Then a(n) is just the number of Hamiltonian cycles contained in T(n). Thus a(n) > 0 if and only if T(n) is a Hamilton graph.
Zhi-Wei Sun also made the following similar conjectures for odd primes, Sophie Germain primes, cousin primes and sexy primes:
(1) For any integer n > 0, there is a permutation i_0, i_1, ..., i_n of 0, 1, ..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are integers of the form (p-1)/2, where p is an odd prime. Also, we may replace the above (p-1)/2 by (p+1)/4 or (p-1)/6; when n > 4 we may substitute (p-1)/4 for (p-1)/2.
(2) For any integer n > 2, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are integers of the form (p+1)/6, where p is a Sophie Germain prime.
(3) For any integer n > 3, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are among those integers k with 6*k+1 and 6*k+5 both prime.
(4) For any integer n > 4, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are among those integers k with 2*k-3 and 2*k+3 both prime.

Examples

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

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,7,5,2,3,4,6,1) is identical to (0,1,6,4,3,2,5,7) if we ignore direction. Thus a(7) is half of the number of circular permutations yielded by this program. *)
    tp[n_]:=tp[n]=PrimeQ[6n-1]&&PrimeQ[6n+1]
    V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
    m=0
    Do[Do[If[tp[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(25) from Max Alekseyev, Sep 12 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

A228885 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is coprime to n or not.

Original entry on oeis.org

1, -1, -2, 0, 4, -4, -6, 0, 0, -16, -10, 0, 12, -36, -2048, 0, 16, 0, -18, 0, 27648, -100, -22, 0, 0, -144, 0, 0, 28, -4194304, -30, 0, 2048000, -256, -127401984, 0, 36, -324, -14155776, 0, 40, -764411904, -42, 0, 0, -484, -46, 0, 0, 0, -536870912, 0, 52, 0, -419430400000, 0, 3057647616, -784, -58, 0
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 06 2013

Keywords

Comments

Conjecture: If n is squarefree, then (-1)^(n*(n-1)/2)*a(n) > 0.
When p^2 divides n with p prime, (i + n/p) + j is coprime to n if and only if i + j is coprime to n. So a(n) = 0 if n is not squarefree.
It is easy to show that Phi(n) divides a(n) for any n > 0, where Phi(n) is Euler's totient function. Also, a(p) = (-1)^((p-1)/2)*(p-1) for any odd prime p.

Examples

			a(1) = 1 since 1 + 1 = 2 is relatively prime to 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Det[Table[If[GCD[i+j,n]==1,1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,60}]
  • PARI
    a(n) = matdet(matrix(n, n, i, j, gcd(n, i+j)==1)); \\ Michel Marcus, Aug 25 2021

Formula

Conjectures from Ridouane Oudra, Mar 13 2025: (Start)
a(n) = (-1)^floor(n/2)*mu(n)^2*Product_{k=1..n} phi(gcd(n,k)).
a(n) = (-1)^floor(n/2)*mu(n)^2*Product_{d|n} phi(d)^phi(n/d).
a(n) = A057077(n)*A008966(n)*A349741(n)*A000010(n). (End)
Showing 1-3 of 3 results.