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-4 of 4 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

A191563 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 or reflection are regarded as identical). a(1)=1, a(2)=2 by convention.

Original entry on oeis.org

1, 2, 4, 19, 136, 3036, 151848, 16814116, 3818273456, 1759237059488, 1637673128642016, 3074457382841680224, 11624286729262765320064, 88424288520685885682129216, 1352160640243480723729126645248, 41538374868278630828076760060403776, 2562126056816477844908944991509312669696
Offset: 1

Views

Author

N. J. A. Sloane, Jun 29 2011

Keywords

Crossrefs

Suggested by A192314. See A192332 for orbits under cyclic group.

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;
    if n mod 2 = 0 then t0:=t0+n*2^(n^2/4)
    else t0:=t0+n*2^((n^2-1)/4); fi;
    t0/(2*n); end;
    s1:=[seq(f(n),n=1..20)];
  • Mathematica
    Table[(2^((n^2-Mod[n,2])/4) + 1/n*(Plus@@ Map[Function[d,EulerPhi[d]*2^((n*(n-Mod[d,2])/2)/d)],Divisors[n]]))/2, {n,1,20}] (* From Olivier Gérard, Aug 27 2011 *)

Formula

See Maple program.

A192313 Constant term of the reduction of n-th polynomial at A157751 by x^2->x+1.

Original entry on oeis.org

1, 2, 5, 13, 34, 91, 247, 680, 1893, 5319, 15056, 42867, 122605, 351898, 1012729, 2920521, 8435362, 24392655, 70599403, 204472264
Offset: 1

Views

Author

Clark Kimberling, Jun 28 2011

Keywords

Comments

For an introduction to reductions of polynomials by substitutions such as x^2->x+1, see A192232.

Examples

			The first five polynomials at A157751 and their reductions are as follows:
p0(x)=1 -> 1
p1(x)=2+x -> 2+x
p2(x)=4+2x+x^2 -> 5+3x
p3(x)=8+4x+4x^2+x^3 -> 13+10x
p4(x)=16+8x+12x^2+4x^3+x^4 -> 34+31x.
From these, we read
A192313=(1,2,5,13,34,...) and A192314=(0,1,3,19,31,...)
		

Crossrefs

Programs

  • Mathematica
    q[x_] := x + 1;
    p[0, x_] := 1;
    p[n_, x_] := (x + 1)*p[n - 1, x] + p[n - 1, -x] /; n > 0  (* A157751 *)
    Table[Simplify[p[n, x]], {n, 0, 5}]
    reductionRules = {x^y_?EvenQ -> q[x]^(y/2), x^y_?OddQ -> x q[x]^((y - 1)/2)};
    t = Table[Last[Most[FixedPointList[Expand[#1 /. reductionRules] &, p[n, x]]]], {n, 0, 20}]
    Table[Coefficient[Part[t, n], x, 0], {n, 1, 20}]
      (* A192313 *)
    Table[Coefficient[Part[t, n], x, 1], {n, 1, 20}]
      (* A192337 *)

Formula

Empirical G.f.: x*(x+1)*(x^2-3*x+1)/(x^4+6*x^3+x^2-4*x+1). [Colin Barker, Nov 13 2012]
Showing 1-4 of 4 results.