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

A192332 For n >= 3, draw a regular n-sided polygon and its n(n-3)/2 diagonals, so there are n(n-1)/2 lines; a(n) is the number of ways to choose a subset of these lines (subsets differing by a rotation are regarded as identical). a(1)=1, a(2)=2 by convention.

Original entry on oeis.org

1, 2, 4, 22, 208, 5560, 299600, 33562696, 7635498336, 3518440564544, 3275345183542208, 6148914696963883712, 23248573454127484129024, 176848577040808821410837120, 2704321280486889389864215362560, 83076749736557243209409446411255936, 5124252113632955685095523500148980125696, 634332307869315502692705867068871886072665600
Offset: 1

Views

Author

N. J. A. Sloane, Jun 28 2011

Keywords

Comments

Suggested by A192314.
Also the number of graphical necklaces with n vertices. We define a graphical necklace to be a simple graph that is minimal among all n rotations of the vertices. Alternatively, it is an equivalence class of simple graphs under rotation of the vertices. These are a kind of partially labeled graphs. - Gus Wiseman, Mar 04 2019

Examples

			From _Gus Wiseman_, Mar 04 2019: (Start)
Inequivalent representatives of the a(1) = 1 through a(4) = 22 graphical necklace edge-sets:
  {}  {}      {}              {}
      {{12}}  {{12}}          {{12}}
              {{12}{13}}      {{13}}
              {{12}{13}{23}}  {{12}{13}}
                              {{12}{14}}
                              {{12}{24}}
                              {{12}{34}}
                              {{13}{24}}
                              {{12}{13}{14}}
                              {{12}{13}{23}}
                              {{12}{13}{24}}
                              {{12}{13}{34}}
                              {{12}{14}{23}}
                              {{12}{24}{34}}
                              {{12}{13}{14}{23}}
                              {{12}{13}{14}{24}}
                              {{12}{13}{14}{34}}
                              {{12}{13}{24}{34}}
                              {{12}{14}{23}{34}}
                              {{12}{13}{14}{23}{24}}
                              {{12}{13}{14}{23}{34}}
                              {{12}{13}{14}{23}{24}{34}}
(End)
		

Crossrefs

Cf. A192314, A191563 (orbits under dihedral group).
Cf. A000031, A000939 (cycle necklaces), A008965, A059966, A060223, A061417, A086675 (digraph version), A184271, A275527, A323858, A324461, A324463, A324464.

Programs

  • Maple
    with(numtheory);
    f:=proc(n) local t0, t1, d; t0:=0; t1:=divisors(n);
    for d in t1 do
    if d mod 2 = 0 then t0:=t0+phi(d)*2^(n^2/(2*d))
    else t0:=t0+phi(d)*2^(n*(n-1)/(2*d)); fi; od; t0/n; end;
    [seq(f(n), n=1..30)];
  • Mathematica
    Table[ 1/n* Plus @@ Map[Function[d, EulerPhi[d]*2^((n*(n - Mod[d, 2])/2)/d)], Divisors[n]], {n, 1, 20}]  (* Olivier Gérard, Aug 27 2011 *)
    rotgra[g_,m_]:=Sort[Sort/@(g/.k_Integer:>If[k==m,1,k+1])];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],#=={}||#==First[Sort[Table[Nest[rotgra[#,n]&,#,j],{j,n}]]]&]],{n,0,5}] (* Gus Wiseman, Mar 04 2019 *)
  • PARI
    a(n) = sumdiv(n, d, if (d%2, eulerphi(d)*2^(n*(n-1)/(2*d)), eulerphi(d)*2^(n^2/(2*d))))/n; \\ Michel Marcus, Mar 08 2019

Formula

a(n) = (1/n)*(Sum_{d|n, d odd} phi(d)*2^(n*(n-1)/(2*d)) + Sum_{d|n, d even} phi(d)*2^(n^2/(2*d))).

A324461 Number of simple graphs with n vertices and distinct rotations.

Original entry on oeis.org

1, 1, 0, 6, 48, 1020, 32232, 2097144, 268369920, 68719472640, 35184338533920, 36028797018963936, 73786976226114539520, 302231454903657293676480, 2475880078570197599844819072, 40564819207303340847860140736640, 1329227995784915854457062986570792960
Offset: 0

Views

Author

Gus Wiseman, Feb 28 2019

Keywords

Comments

A simple graph with n vertices has distinct rotations if all n rotations of its vertex set act on the edge set to give distinct graphs. These are different from aperiodic graphs and acyclic graphs but are similar to aperiodic sequences (A000740) and aperiodic arrays (A323867).

Crossrefs

Programs

  • Mathematica
    rotgra[g_,m_]:=Sort[Sort/@(g/.k_Integer:>If[k==m,1,k+1])];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],UnsameQ@@Table[Nest[rotgra[#,n]&,#,j],{j,n}]&]],{n,0,5}]
  • PARI
    a(n)={if(n==0, 1, sumdiv(n, d, moebius(d)*2^(n*(n/d-1)/2 + n*(d\2)/d)))} \\ Andrew Howroyd, Aug 15 2019
    
  • Python
    from sympy import mobius, divisors
    def A324461(n): return sum(mobius(m:=n//d)<<(n*(d-1)>>1)+d*(m>>1) for d in divisors(n,generator=True)) if n else 1 # Chai Wah Wu, Jul 03 2024

Formula

a(n > 0) = A306715(n) * n.
a(n) = Sum_{d|n} mu(d)*2^(n*(n/d-1)/2 + n*floor(d/2)/d) for n > 0. - Andrew Howroyd, Aug 15 2019

Extensions

Terms a(7) and beyond from Andrew Howroyd, Aug 15 2019

A086675 Number of n X n (0,1)-matrices modulo cyclic permutations of the rows.

Original entry on oeis.org

1, 2, 10, 176, 16456, 6710912, 11453291200, 80421421917440, 2305843009750581376, 268650182136584290872320, 126765060022823052739661424640, 241677817415439249618874010960064512, 1858395433210885261795036719974526548094976
Offset: 0

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 27 2003

Keywords

Comments

Also the number of digraphical necklaces with n vertices. A digraphical necklace is defined to be a directed graph that is minimal among all n rotations of the vertices. Alternatively, it is an equivalence class of directed graphs under rotation of the vertices. These are a kind of partially labeled digraphs. - Gus Wiseman, Mar 04 2019

Examples

			From _Gus Wiseman_, Mar 04 2019: (Start)
Inequivalent representatives of the a(2) = 10 digraphical necklace edge-sets:
  {}
  {(1,1)}
  {(1,2)}
  {(1,1),(1,2)}
  {(1,1),(2,1)}
  {(1,1),(2,2)}
  {(1,2),(2,1)}
  {(1,1),(1,2),(2,1)}
  {(1,1),(1,2),(2,2)}
  {(1,1),(1,2),(2,1),(2,2)}
(End)
		

Crossrefs

Cf. A000031 (binary necklaces), A000939 (cycle necklaces), A008965, A060690, A061417 (permutation necklaces), A184271, A192332 (graphical necklaces), A275527 (path necklaces), A323858 (toroidal necklaces), A323870.

Programs

  • Mathematica
    Table[Fold[ #1+EulerPhi[ #2] 2^(n^2 /#2)&, 0, Divisors[n]]/n, {n, 16}]
    (* second program *)
    rotdigra[g_,m_]:=Sort[g/.k_Integer:>If[k==m,1,k+1]];
    Table[Length[Select[Subsets[Tuples[Range[n],2]],#=={}||#==First[Sort[Table[Nest[rotdigra[#,n]&,#,j],{j,n}]]]&]],{n,0,4}] (* Gus Wiseman, Mar 04 2019 *)

Formula

a(n) = (1/n)*Sum_{ d divides n } phi(d)*2^(n^2/d) for n > 0, a(0) = 1.

Extensions

More terms from Wouter Meeussen, Jul 29 2003
a(0)=1 prepended by Gus Wiseman, Mar 04 2019

A324462 Number of simple graphs covering n vertices with distinct rotations.

Original entry on oeis.org

1, 0, 0, 3, 28, 765, 26958, 1887277, 252458904, 66376420155, 34508978662350, 35645504882731557, 73356937843604425644, 301275024444053951967585, 2471655539736990372520379226, 40527712706903544100966076156895, 1328579255614092949957261201822704816
Offset: 0

Views

Author

Gus Wiseman, Feb 28 2019

Keywords

Comments

A simple graph with n vertices has distinct rotations if all n rotations of its vertex set act on the edge set to give distinct graphs. It is covering if there are no isolated vertices. These are different from aperiodic graphs and acyclic graphs but are similar to aperiodic sequences (A000740) and aperiodic arrays (A323867).

Crossrefs

Programs

  • Mathematica
    rotgra[g_,m_]:=Sort[Sort/@(g/.k_Integer:>If[k==m,1,k+1])];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],And[Union@@#==Range[n],UnsameQ@@Table[Nest[rotgra[#,n]&,#,j],{j,n}]]&]],{n,0,5}]
  • PARI
    a(n)={if(n<1, n==0, sumdiv(n, d, moebius(n/d)*sum(k=0, d, (-1)^(d-k)*binomial(d,k)*2^(k*(k-1)*n/(2*d) + k*(n/d\2)))))} \\ Andrew Howroyd, Aug 19 2019

Formula

a(n) = Sum{d|n} mu(n/d) * Sum_{k=0..d} (-1)^(d-k)*binomial(d,k)*2^( k*(k-1)*n/(2*d) + k*(floor(n/(2*d))) ) for n > 0. - Andrew Howroyd, Aug 19 2019

Extensions

Terms a(7) and beyond from Andrew Howroyd, Aug 19 2019

A324463 Number of graphical necklaces covering n vertices.

Original entry on oeis.org

1, 0, 1, 2, 15, 156, 4665, 269618, 31573327, 7375159140, 3450904512841, 3240500443884718, 6113078165054644451, 23175001880311842459108, 176546824267008236554238517, 2701847513793569606737940203894, 83036203475880811677609125194805687
Offset: 0

Views

Author

Gus Wiseman, Feb 28 2019

Keywords

Comments

A graphical necklace is a simple graph that is minimal among all n rotations of the vertices. Alternatively, it is an equivalence class of simple graphs under rotation of the vertices. Covering means there are no isolated vertices. These are a kind of partially labeled graphs.

Examples

			Inequivalent representatives of the a(2) = 1 through a(4) = 15 graphical necklaces:
  {{12}}  {{12}{13}}      {{12}{34}}
          {{12}{13}{23}}  {{13}{24}}
                          {{12}{13}{14}}
                          {{12}{13}{24}}
                          {{12}{13}{34}}
                          {{12}{14}{23}}
                          {{12}{24}{34}}
                          {{12}{13}{14}{23}}
                          {{12}{13}{14}{24}}
                          {{12}{13}{14}{34}}
                          {{12}{13}{24}{34}}
                          {{12}{14}{23}{34}}
                          {{12}{13}{14}{23}{24}}
                          {{12}{13}{14}{23}{34}}
                          {{12}{13}{14}{23}{24}{34}}
		

Crossrefs

Programs

  • Mathematica
    rotgra[g_,m_]:=Sort[Sort/@(g/.k_Integer:>If[k==m,1,k+1])];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],And[Union@@#==Range[n],#=={}||#==First[Sort[Table[Nest[rotgra[#,n]&,#,j],{j,n}]]]]&]],{n,0,5}]
  • PARI
    a(n)={if(n<1, n==0, sumdiv(n, d, eulerphi(n/d)*sum(k=0, d, (-1)^(d-k)*binomial(d,k)*2^(k*(k-1)*n/(2*d) + k*(n/d\2))))/n)} \\ Andrew Howroyd, Aug 19 2019

Formula

a(n) = (1/n)*Sum{d|n} phi(n/d) * Sum_{k=0..d} (-1)^(d-k)*binomial(d,k)*2^( k*(k-1)*n/(2*d) + k*(floor(n/(2*d))) ). - Andrew Howroyd, Aug 19 2019

Extensions

Terms a(7) and beyond from Andrew Howroyd, Aug 19 2019
Showing 1-5 of 5 results.