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-10 of 40 results. Next

A057500 Number of connected labeled graphs with n edges and n nodes.

Original entry on oeis.org

0, 0, 1, 15, 222, 3660, 68295, 1436568, 33779340, 880107840, 25201854045, 787368574080, 26667815195274, 973672928417280, 38132879409281475, 1594927540549217280, 70964911709203684440, 3347306760024413356032, 166855112441313024389625, 8765006377126199463936000
Offset: 1

Views

Author

Qing-Hu Hou and David C. Torney (dct(AT)lanl.gov), Sep 01 2000

Keywords

Comments

Equivalently, number of connected unicyclic (i.e., containing one cycle) graphs on n labeled nodes. - Vladeta Jovovic, Oct 26 2004
a(n) is the number of trees on vertex set [n] = {1,2,...,n} rooted at 1 with one marked inversion (an inversion is a pair (i,j) with i > j and j a descendant of i in the tree). Here is a bijection from the title graphs (on [n]) to these marked trees. A title graph has exactly one cycle. There is a unique path from vertex 1 to this cycle, first meeting it at k, say (k may equal 1). Let i and j be the two neighbors of k in the cycle, with i the larger of the two. Delete the edge k<->j thereby forming a tree (in which j is a descendant of i) and take (i,j) as the marked inversion. To reverse this map, create a cycle by joining the smaller element of the marked inversion to the parent of the larger element. a(n) = binomial(n-1,2)*A129137(n). This is because, on the above marked trees, the marked inversion is uniformly distributed over 2-element subsets of {2,3,...,n} and so a(n)/binomial(n-1,2) is the number of trees on [n] (rooted at 1) for which (3,2) is an inversion. - David Callan, Mar 30 2007

Examples

			E.g., a(4)=15 because there are three different (labeled) 4-cycles and 12 different labeled graphs with a 3-cycle and an attached, external vertex.
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973.
  • C. L. Mallows, Letter to N. J. A. Sloane, 1980.
  • R. J. Riddell, Contributions to the theory of condensation, Dissertation, Univ. of Michigan, Ann Arbor, 1951.

Crossrefs

A diagonal of A343088.
Cf. A000272 = labeled trees on n nodes; connected labeled graphs with n nodes and n+k edges for k=0..8: this sequence, A061540, A061541, A061542, A061543, A096117, A061544, A096150, A096224.
Cf. A001429 (unlabeled case), A052121.
For any number of edges we have A001187, unlabeled A001349.
This is the connected and covering case of A116508.
For #edges <= #nodes we have A129271, covering A367869.
For #edges > #nodes we have A140638, covering A367868.
This is the connected case of A367862 and A367863, unlabeled A006649.
The version with loops is A368951, unlabeled A368983.
This is the covering case of A370317.
Counting only covering vertices gives A370318.
A006125 counts graphs, A000088 unlabeled.
A006129 counts covering graphs, A002494 unlabeled.

Programs

  • Maple
    egf:= -1/2*ln(1+LambertW(-x)) +1/2*LambertW(-x) -1/4*LambertW(-x)^2:
    a:= n-> n!*coeff(series(egf, x, n+3), x, n):
    seq(a(n), n=1..25);  # Alois P. Heinz, Mar 27 2013
  • Mathematica
    nn=20; t=Sum[n^(n-1) x^n/n!, {n,1,nn}]; Drop[Range[0,nn]! CoefficientList[Series[Log[1/(1-t)]/2-t^2/4-t/2, {x,0,nn}], x], 1]  (* Geoffrey Critzer, Oct 07 2012 *)
    a[n_] := (n-1)!*n^n/2*Sum[1/(n^k*(n-k)!), {k, 3, n}]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Jan 15 2014, after Vladeta Jovovic *)
    csm[s_]:=With[{c=Select[Subsets[Range[Length[s]],{2}],Length[Intersection@@s[[#]]]>0&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]],Union@@#==Range[n]&&Length[#]==n&&Length[csm[#]]<=1&]],{n,0,5}] (* Gus Wiseman, Feb 19 2024 *)
  • Sage
    # Warning: Floating point calculation. Adjust precision as needed!
    from mpmath import mp, chop, gammainc
    mp.dps = 200; mp.pretty = True
    for n in (1..100):
        print(chop((n^(n-2)*(1-3*n)+exp(n)*gammainc(n+1, n)/n)/2))
    # Peter Luschny, Jan 27 2016

Formula

The number of labeled connected graphs with n nodes and m edges is Sum_{k=1..n} (-1)^(k+1)/k*Sum_{n_1+n_2+..n_k=n, n_i>0} n!/(Product_{i=1..k} (n_i)!)* binomial(s, m), s=Sum_{i..k} binomial(n_i, 2). - Vladeta Jovovic, Apr 10 2001
E.g.f.: (1/2) Sum_{k>=3} T(x)^k/k, with T(x) = Sum_{n>=1} n^(n-1)/n! x^n. R. J. Riddell's thesis contains a closed-form expression for the number of connected graphs with m nodes and n edges. The present series applies to the special case m=n.
E.g.f.: -1/2*log(1+LambertW(-x))+1/2*LambertW(-x)-1/4*LambertW(-x)^2. - Vladeta Jovovic, Jul 09 2001
Asymptotic expansion (with xi=sqrt(2*Pi)): n^(n-1/2)*[xi/4-7/6*n^(-1/2)+xi/48* n^(-1)+131/270*n^(-3/2)+xi/1152*n^(-2)+4/2835*n^(-5/2)+O(n^(-3))]. - Keith Briggs, Aug 16 2004
Row sums of A098909: a(n) = (n-1)!*n^n/2*Sum_{k=3..n} 1/(n^k*(n-k)!). - Vladeta Jovovic, Oct 26 2004
a(n) = Sum_{k=0..C(n-1,2)} k*A052121(n,k). - Alois P. Heinz, Nov 29 2015
a(n) = (n^(n-2)*(1-3*n)+exp(n)*Gamma(n+1,n)/n)/2. - Peter Luschny, Jan 27 2016
a(n) = A062734(n,n+1) = A123527(n,n). - Gus Wiseman, Feb 19 2024

Extensions

More terms from Vladeta Jovovic, Jul 09 2001

A116508 a(n) = C( C(n,2), n).

Original entry on oeis.org

1, 0, 0, 1, 15, 252, 5005, 116280, 3108105, 94143280, 3190187286, 119653565850, 4922879481520, 220495674290430, 10682005290753420, 556608279578340080, 31044058215401404845, 1845382436487682488000, 116475817125419611477660, 7779819801401934344268210
Offset: 0

Views

Author

Christopher Hanusa (chanusa(AT)math.binghamton.edu), Mar 21 2006

Keywords

Comments

a(n) is the number of simple labeled graphs with n nodes and n edges. - Geoffrey Critzer, Nov 02 2014
These graphs are not necessarily covering, but the covering case is A367863, unlabeled A006649, and the unlabeled version is A001434. - Gus Wiseman, Dec 22 2023

Examples

			a(5) = C(C(5,2),5) = C(10,5) = 252.
		

Crossrefs

Main diagonal of A084546.
The unlabeled version is A001434, covering case A006649.
The connected case is A057500, unlabeled A001429.
For set-systems we have A136556, covering case A054780.
The covering case is A367863.
A006125 counts graphs, A000088 unlabeled.
A006129 counts covering graphs, A002494 unlabeled.
A133686 counts graphs satisfying a strict AOC, connected A129271.
A367867 counts graphs contradicting a strict AOC, connected A140638.

Programs

  • Magma
    [0] cat [(Binomial(Binomial(n+2, n), n+2)): n in [0..20]]; // Vincenzo Librandi, Nov 03 2014
    
  • Maple
    a:= n-> binomial(binomial(n, 2), n):
    seq(a(n), n=0..20);
  • Mathematica
    nn = 18; f[x_, y_] :=
    Sum[(1 + y)^Binomial[n, 2] x^n/n!, {n, 1, nn}]; Table[
    n! Coefficient[Series[f[x, y], {x, 0, nn}], x^n y^n], {n, 1, nn}] (* Geoffrey Critzer, Nov 02 2014 *)
    Table[Length[Subsets[Subsets[Range[n],{2}],{n}]],{n,0,5}] (* Gus Wiseman, Dec 22 2023 *)
    Table[SeriesCoefficient[(1 + x)^(n*(n-1)/2), {x, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Aug 06 2025 *)
  • Python
    from math import comb
    def A116508(n): return comb(n*(n-1)>>1,n) # Chai Wah Wu, Jul 02 2024
  • Sage
    [(binomial(binomial(n+2,n),n+2)) for n in range(-1, 17)] # Zerinvary Lajos, Nov 30 2009
    

Formula

a(n) ~ exp(n - 2) * n^(n - 1/2) / (sqrt(Pi) * 2^(n + 1/2)). - Vaclav Kotesovec, May 19 2020
a(n) = [x^n] (1+x)^(n*(n-1)/2). - Vaclav Kotesovec, Aug 06 2025

Extensions

a(0)=1 prepended by Alois P. Heinz, Feb 02 2024

A367863 Number of n-vertex labeled simple graphs with n edges and no isolated vertices.

Original entry on oeis.org

1, 0, 0, 1, 15, 222, 3760, 73755, 1657845, 42143500, 1197163134, 37613828070, 1295741321875, 48577055308320, 1969293264235635, 85852853154670693, 4005625283891276535, 199166987259400191480, 10513996906985414443720, 587316057411626070658200, 34612299496604684775762261
Offset: 0

Views

Author

Gus Wiseman, Dec 07 2023

Keywords

Examples

			Non-isomorphic representatives of the a(4) = 15 graphs:
  {{1,2},{1,3},{1,4},{2,3}}
  {{1,2},{1,3},{2,4},{3,4}}
		

Crossrefs

The connected case is A057500, unlabeled A001429.
The unlabeled version is A006649.
The non-covering version is A116508.
For set-systems we have A367916, ranks A367917.
A001187 counts connected graphs, A001349 unlabeled.
A006125 counts graphs, A000088 unlabeled.
A006129 counts covering graphs, A002494 unlabeled.
A058891 counts set-systems, unlabeled A000612, without singletons A016031.
A059201 counts covering T_0 set-systems, unlabeled A319637, ranks A326947.
A133686 = graphs satisfy strict AoC, connected A129271, covering A367869.
A143543 counts simple labeled graphs by number of connected components.
A323818 counts connected set-systems, unlabeled A323819, ranks A326749.
A367867 = graphs contradict strict AoC, connected A140638, covering A367868.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]], Union@@#==Range[n]&&Length[#]==n&]],{n,0,5}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k) * binomial(n,k) * binomial(binomial(k,2), n)) \\ Andrew Howroyd, Dec 29 2023

Formula

Binomial transform is A367862.
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * binomial(binomial(k,2), n). - Andrew Howroyd, Dec 29 2023

Extensions

Terms a(8) and beyond from Andrew Howroyd, Dec 29 2023

A140637 Number of unlabeled graphs of positive excess with n nodes.

Original entry on oeis.org

0, 0, 0, 2, 15, 110, 936, 12073, 273972, 12003332, 1018992968, 165091159269, 50502031331411, 29054155657134165, 31426485969804026075, 64001015704527557101231, 245935864153532932681481794, 1787577725145611700547871854870, 24637809253125004524383007473440146
Offset: 1

Views

Author

Washington Bomfim, May 21 2008

Keywords

Comments

We can find in "The Birth of the Giant Component" p. 53, see the link, the following: "The excess of a graph or multigraph is the number of edges plus the number of acyclic components, minus the number of vertices."
If G has just one complex component with 4 nodes, the "non-complex part" of G can be,
a) One forest of order 4. There are 6 forests, so 2*6=12 graphs.
b) One triangle and one isolated vertex, or 2*1=2 graphs.
c) One unicyclic graph of order 4, so 2*2=4 graphs.
Also the number of unchoosable unlabeled graphs with up to n vertices, where a graph is choosable iff it is possible to choose a different vertex from each edge. The labeled version is A367867, covering A367868, connected A140638. - Gus Wiseman, Feb 13 2024

Examples

			Below we show that a(8) = 12073. Note that A140636(n) is the number of connected graphs of positive excess with n nodes.
Let G be a disconnected graph of positive excess with 8 nodes. In this case, G has one or two complex components. We have 3 graphs of order 8 with two complex components. One of those graphs is depicted in the figure below:
  O---O...O---O
  |\..|...|\./|
  |.\.|...|.X.|
  |..\|...|/.\|
  O---O...O---O
If G has one complex component with 5 nodes, the non-complex part of G can be,
a) One forest of order 3. There are 3 forests, so A140636(5) * 3 = 39 graphs.
b) One triangle, so A140636(5) = 13 graphs.
If G has one complex component with 6 nodes, the non-complex part of G is a forest of order 2. There are 2 forests. We have A140636(6) * 2, or 186 graphs.
If G has one complex component with 7 nodes, the non-complex part of G is one isolated vertex. We have A140636(7), or 809 graphs.
Finally if G is connected, we have A140636(8), or 11005 graphs.
The total is 3 + 12 + 2 + 4 + 39 + 13 + 186 + 809 + 11005 = 12073.
		

Crossrefs

The labeled complement is A133686, covering A367869, connected A129271.
The complement is A134964, connected A005703.
The connected covering case is A140636.
The labeled version is A367867, covering A367868, connected A140638.
Set-systems not of this type are A367902, ranks A367906.
Set-systems of this type are A367903, ranks A367907.
For set-systems we have A368094, complement A368095.
For multiset partitions we have A368097, complement A368098.
Factorizations of this type are A368413, complement A368414.

Programs

  • Mathematica
    brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{(Union@@m)[[i]],p[[i]]},{i,Length[p]}])], {p,Permutations[Range[Length[Union@@m]]]}]]];
    Table[Length[Union[brute /@ Select[Subsets[Subsets[Range[n],{2}]],Select[Tuples[#], UnsameQ@@#&]=={}&]]],{n,0,5}] (* Gus Wiseman, Feb 14 2024 *)

Formula

a(n) = A000088(n) - A134964(n).

A134964 Number of unlabeled n-node simple graphs with at most one cycle in each connected component.

Original entry on oeis.org

1, 1, 2, 4, 9, 19, 46, 108, 273, 696, 1836, 4896, 13323, 36541, 101323, 282693, 793697, 2237982, 6335978, 17992622, 51235887, 146228734, 418181860, 1197972026, 3437159492, 9875198568, 28407202891, 81807809714, 235831978115, 680478488927, 1965160731704
Offset: 0

Views

Author

Washington Bomfim, May 14 2008

Keywords

Comments

a(n) is the number of pseudoforests on n nodes. - Eric W. Weisstein, Jun 11 2012

Crossrefs

Cf. A005703 (number of pseudotrees), A137917 (number of maximal pseudoforests).

Programs

  • Mathematica
    Needs["Combinatorica`"];
    nn=30;s[n_,k_]:=s[n,k]=a[n+1-k]+If[n<2k,0,s[n-k,k]];a[1]=1;a[n_]:=a[n]=Sum[a[i]s[n-1,i]i,{i,1,n-1}]/(n-1);rt=Table[a[i],{i,1,nn}];cu=Drop[Apply[Plus,Table[Take[CoefficientList[CycleIndex[DihedralGroup[n],s]/.Table[s[j]->Table[Sum[rt[[i]]x^(k*i),{i,1,nn}],{k,1,nn}][[j]],{j,1,nn}],x],nn],{n,3,nn}]],1];t[n_,k_]:=t[n,k]=b[n+1-k]+If[n<2k,0,t[n-k,k]];b[1]=1;b[n_]:=b[n]=Sum[b[i]t[n-1,i]i,{i,1,n-1}]/(n-1);ft=Table[b[i]-Sum[b[j]b[i-j],{j,1,i/2}]+If[OddQ[i],0,b[i/2](b[i/2]+1)/2],{i,1,nn}];
    CoefficientList[Series[Product[1/(1-x^i)^(cu[[i]]+ft[[i]]),{i,1,nn-1}],{x,0,nn}],x]  (* Geoffrey Critzer, Oct 13 2012, after codes given by Robert A. Russell in A134964 and A000055 *)

Formula

a(0) = 1, for n >= 1, a(n) = Sum_{1*j_1 + 2*j_2 + ··· = n} ( Product_{i = 1..n} binomial(A005703(i+1) + j_i -1, j_i) ) [(4.27) of [F. Ruskey] with n replaced by n+1, and a_i replaced by A005703(i+1)].
Euler transform of A001429 + A000055. - Geoffrey Critzer, Oct 13 2012

Extensions

Edited by Washington Bomfim, Jun 27 2012
Terms a(29) and beyond from Andrew Howroyd, May 16 2021

A367862 Number of n-vertex labeled simple graphs with the same number of edges as covered vertices.

Original entry on oeis.org

1, 1, 1, 2, 20, 308, 5338, 105298, 2366704, 60065072, 1702900574, 53400243419, 1836274300504, 68730359299960, 2782263907231153, 121137565273808792, 5645321914669112342, 280401845830658755142, 14788386825536445299398, 825378055206721558026931, 48604149005046792753887416
Offset: 0

Views

Author

Gus Wiseman, Dec 07 2023

Keywords

Comments

Unlike the connected case (A057500), these graphs may have more than one cycle; for example, the graph {{1,2},{1,3},{1,4},{2,3},{2,4},{5,6}} has multiple cycles.

Examples

			Non-isomorphic representatives of the a(4) = 20 graphs:
  {}
  {{1,2},{1,3},{2,3}}
  {{1,2},{1,3},{1,4},{2,3}}
  {{1,2},{1,3},{2,4},{3,4}}
		

Crossrefs

The connected case is A057500, unlabeled A001429.
Counting all vertices (not just covered) gives A116508.
The covering case is A367863, unlabeled A006649.
For set-systems we have A367916, ranks A367917.
A001187 counts connected graphs, A001349 unlabeled.
A003465 counts covering set-systems, unlabeled A055621, ranks A326754.
A006125 counts graphs, A000088 unlabeled.
A006129 counts covering graphs, A002494 unlabeled.
A058891 counts set-systems, unlabeled A000612, without singletons A016031.
A059201 counts covering T_0 set-systems, unlabeled A319637, ranks A326947.
A133686 = graphs satisfy strict AoC, connected A129271, covering A367869.
A143543 counts simple labeled graphs by number of connected components.
A323818 counts connected set-systems, unlabeled A323819, ranks A326749.
A367867 = graphs contradict strict AoC, connected A140638, covering A367868.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]], Length[#]==Length[Union@@#]&]],{n,0,5}]
  • PARI
    \\ Here b(n) is A367863(n)
    b(n) = sum(k=0, n, (-1)^(n-k) * binomial(n,k) * binomial(binomial(k,2), n))
    a(n) = sum(k=0, n, binomial(n,k) * b(k)) \\ Andrew Howroyd, Dec 29 2023

Formula

Binomial transform of A367863.

Extensions

Terms a(8) and beyond from Andrew Howroyd, Dec 29 2023

A005703 Number of n-node connected graphs with at most one cycle.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 19, 44, 112, 287, 763, 2041, 5577, 15300, 42419, 118122, 330785, 929469, 2621272, 7411706, 21010378, 59682057, 169859257, 484234165, 1382567947, 3952860475, 11315775161, 32430737380, 93044797486, 267211342954, 768096496093, 2209772802169
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of pseudotrees on n nodes. - Eric W. Weisstein, Jun 11 2012
Also unlabeled connected graphs covering n vertices with at most n edges. For this definition we have a(1) = 0 and possibly a(0) = 0. - Gus Wiseman, Feb 20 2024

Examples

			From _Gus Wiseman_, Feb 20 2024: (Start)
Representatives of the a(0) = 1 through a(5) = 8 graphs:
  {}  .  {12}  {12,13}     {12,13,14}     {12,13,14,15}
               {12,13,23}  {12,13,24}     {12,13,14,25}
                           {12,13,14,23}  {12,13,24,35}
                           {12,13,24,34}  {12,13,14,15,23}
                                          {12,13,14,23,25}
                                          {12,13,14,23,45}
                                          {12,13,14,25,35}
                                          {12,13,24,35,45}
(End)
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 150.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000055, A000081, A001429 (labeled A057500), A134964 (number of pseudoforests, labeled A133686).
The labeled version is A129271.
The connected complement is A140636, labeled A140638.
Non-connected: A368834 (labeled A367869) or A370316 (labeled A369191).
A001187 counts connected graphs, unlabeled A001349.
A006125 counts simple graphs, unlabeled A000088.
A006129 counts covering graphs, unlabeled A002494.
A062734 counts connected graphs by number of edges.

Programs

  • Mathematica
    Needs["Combinatorica`"]; nn = 20; t[x_] := Sum[a[n] x^n, {n, 1, nn}];
    a[0] = 0;
    b = Drop[Flatten[
        sol = SolveAlways[
          0 == Series[
            t[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}],
          x]; Table[a[n], {n, 0, nn}] /. sol], 1];
    r[x_] := Sum[b[[n]] x^n, {n, 1, nn}]; c =
    Drop[Table[
        CoefficientList[
         Series[CycleIndex[DihedralGroup[n], s] /.
           Table[s[i] -> r[x^i], {i, 1, n}], {x, 0, nn}], x], {n, 3,
         nn}] // Total, 1];
    d[x_] := Sum[c[[n]] x^n, {n, 1, nn}]; CoefficientList[
    Series[r[x] - (r[x]^2 - r[x^2])/2 + d[x] + 1, {x, 0, nn}], x] (* Geoffrey Critzer, Nov 17 2014 *)
  • PARI
    \\ TreeGf gives gf of A000081.
    TreeGf(N)={my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    seq(n)={my(t=TreeGf(n)); my(g(e)=subst(t + O(x*x^(n\e)), x, x^e) + O(x*x^n)); Vec(1 + g(1) + (g(2) - g(1)^2)/2 + sum(k=3, n, sumdiv(k, d, eulerphi(d)*g(d)^(k/d))/k + if(k%2, g(1)*g(2)^(k\2), (g(1)^2+g(2))*g(2)^(k/2-1)/2))/2)}; \\ Andrew Howroyd and Washington Bomfim, May 15 2021

Formula

a(n) = A000055(n) + A001429(n).

Extensions

More terms from Vladeta Jovovic, Apr 19 2000 and from Michael Somos, Apr 26 2000
a(27) corrected and a(28) and a(29) computed by Washington Bomfim, May 14 2008

A137917 a(n) is the number of unlabeled graphs on n nodes whose components are unicyclic graphs.

Original entry on oeis.org

1, 0, 0, 1, 2, 5, 14, 35, 97, 264, 733, 2034, 5728, 16101, 45595, 129327, 368093, 1049520, 2999415, 8584857, 24612114, 70652441, 203075740, 584339171, 1683151508, 4852736072, 14003298194, 40441136815, 116880901512, 338040071375, 978314772989, 2833067885748, 8208952443400
Offset: 0

Views

Author

Washington Bomfim, Feb 24 2008

Keywords

Comments

a(n) is the number of simple unlabeled graphs on n nodes whose components have exactly one cycle. - Geoffrey Critzer, Oct 12 2012
Also the number of unlabeled simple graphs with n vertices and n edges such that it is possible to choose a different vertex from each edge. - Gus Wiseman, Jan 25 2024

Examples

			From _Gus Wiseman_, Jan 25 2024: (Start)
Representatives of the a(0) = 1 through a(5) = 5 simple graphs:
  {}  .  .  {12,13,23}  {12,13,14,23}  {12,13,14,15,23}
                        {12,13,24,34}  {12,13,14,23,25}
                                       {12,13,14,23,45}
                                       {12,13,14,25,35}
                                       {12,13,24,35,45}
(End)
		

Crossrefs

The connected case is A001429.
Without the choice condition we have A001434, covering A006649.
For any number of edges we have A134964, complement A140637.
The labeled version is A137916.
The version with loops is A369145, complement A368835.
The complement is counted by A369201, labeled A369143, covering A369144.
A006129 counts covering graphs, unlabeled A002494.
A054548 counts graphs covering n vertices with k edges, with loops A369199.
A129271 counts connected choosable simple graphs, unlabeled A005703.

Programs

  • Mathematica
    Needs["Combinatorica`"];
    nn=30;s[n_,k_]:=s[n,k]=a[n+1-k]+If[n<2k,0,s[n-k,k]];a[1]=1;a[n_]:=a[n]=Sum[a[i]s[n-1,i]i,{i,1,n-1}]/(n-1);rt=Table[a[i],{i,1,nn}];c=Drop[Apply[Plus,Table[Take[CoefficientList[CycleIndex[DihedralGroup[n],s]/.Table[s[j]->Table[Sum[rt[[i]]x^(k*i),{i,1,nn}],{k,1,nn}][[j]],{j,1,nn}],x],nn],{n,3,nn}]],1];CoefficientList[Series[Product[1/(1-x^i)^c[[i]],{i,1,nn-1}],{x,0,nn}],x]   (* Geoffrey Critzer, Oct 12 2012, after code given by Robert A. Russell in A000081 *)
    brute[m_]:=First[Sort[Table[Sort[Sort/@(m/.Rule@@@Table[{(Union@@m)[[i]],p[[i]]},{i,Length[p]}])],{p,Permutations[Range[Length[Union@@m]]]}]]];
    Table[Length[Union[brute/@Select[Subsets[Subsets[Range[n],{2}],{n}],Select[Tuples[#],UnsameQ@@#&]!={}&]]],{n,0,5}] (* Gus Wiseman, Jan 25 2024 *)

Formula

a(n) = Sum_{1*j_1 + 2*j_2 + ... = n} (Product_{i=3..n} binomial(A001429(i) + j_i -1, j_i)). [F. Ruskey p. 79, (4.27) with n replaced by n+1, and a_i replaced by A001429(i)].
Euler transform of A001429. - Geoffrey Critzer, Oct 12 2012

Extensions

Edited by Washington Bomfim, Jun 27 2012
Terms a(30) and beyond from Andrew Howroyd, May 05 2018
Offset changed to 0 by Gus Wiseman, Jan 27 2024

A136556 a(n) = binomial(2^n - 1, n).

Original entry on oeis.org

1, 1, 3, 35, 1365, 169911, 67945521, 89356415775, 396861704798625, 6098989894499557055, 331001552386330913728641, 64483955378425999076128999167, 45677647585984911164223317311276545, 118839819203635450208125966070067352769535, 1144686912178270649701033287538093722740144666625
Offset: 0

Views

Author

Paul D. Hanna, Jan 07 2008; Paul Hanna and Vladeta Jovovic, Jan 15 2008

Keywords

Comments

Number of n x n binary matrices without zero rows and with distinct rows up to permutation of rows, cf. A014070.
Row 0 of square array A136555.
From Gus Wiseman, Dec 19 2023: (Start)
Also the number of n-element sets of nonempty subsets of {1..n}, or set-systems with n vertices and n edges (not necessarily covering). The covering case is A054780. For example, the a(3) = 35 set-systems are:
{1}{2}{3} {1}{2}{12} {1}{2}{123} {1}{12}{123} {12}{13}{123}
{1}{2}{13} {1}{3}{123} {1}{13}{123} {12}{23}{123}
{1}{2}{23} {1}{12}{13} {1}{23}{123} {13}{23}{123}
{1}{3}{12} {1}{12}{23} {2}{12}{123}
{1}{3}{13} {1}{13}{23} {2}{13}{123}
{1}{3}{23} {2}{3}{123} {2}{23}{123}
{2}{3}{12} {2}{12}{13} {3}{12}{123}
{2}{3}{13} {2}{12}{23} {3}{13}{123}
{2}{3}{23} {2}{13}{23} {3}{23}{123}
{3}{12}{13} {12}{13}{23}
{3}{12}{23}
{3}{13}{23}
Of these, only {{1},{2},{1,2}}, {{1},{3},{1,3}}, and {{2},{3},{2,3}} do not cover the vertex set.
(End)

Examples

			G.f.: A(x) = 1 + x + 3*x^2 + 35*x^3 + 1365*x^4 + 169911*x^5 +...
A(x) = 1/(1+x) + log(1+2*x)/(1+2*x) + log(1+4*x)^2/(2!*(1+4*x)) + log(1+8*x)^3/(3!*(1+8*x)) + log(1+16*x)^4/(4!*(1+16*x)) + log(1+32*x)^5/(5!*(1+32*x)) +...
		

Crossrefs

Sequences of the form binomial(2^n +p*n +q, n): this sequence (0,-1), A014070 (0,0), A136505 (0,1), A136506 (0,2), A060690 (1,-1), A132683 (1,0), A132684 (1,1), A132685 (2,0), A132686 (2,1), A132687 (3,-1), A132688 (3,0), A132689 (3,1).
The covering case A054780 has binomial transform A367916, ranks A367917.
Connected graphs of this type are A057500, unlabeled A001429.
Graphs of this type are A116508, covering A367863, unlabeled A006649.
A003465 counts set-systems covering {1..n}, unlabeled A055621.
A058891 counts set-systems, connected A323818, without singletons A016031.

Programs

  • Magma
    [Binomial(2^n -1, n): n in [0..20]]; // G. C. Greubel, Mar 14 2021
    
  • Maple
    A136556:= n-> binomial(2^n-1,n); seq(A136556(n), n=0..20); # G. C. Greubel, Mar 14 2021
  • Mathematica
    f[n_] := Binomial[2^n - 1, n]; Array[f, 12] (* Robert G. Wilson v *)
    Table[Length[Subsets[Rest[Subsets[Range[n]]],{n}]],{n,0,4}] (* Gus Wiseman, Dec 19 2023 *)
  • PARI
    {a(n) = binomial(2^n-1,n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • PARI
    /* As coefficient of x^n in the g.f.: */
    {a(n) = polcoeff( sum(i=0,n, 1/(1 + 2^i*x +x*O(x^n)) * log(1 + 2^i*x +x*O(x^n))^i/i!), n)}
    for(n=0, 20, print1(a(n), ", "))
    
  • Python
    from math import comb
    def A136556(n): return comb((1<Chai Wah Wu, Jan 02 2024
  • Sage
    [binomial(2^n -1, n) for n in (0..20)] # G. C. Greubel, Mar 14 2021
    

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(2^n,k).
a(n) = (1/n!)*Sum_{k=0..n} Stirling1(n,k) * (2^n-1)^k.
G.f.: Sum_{n>=0} log(1 + 2^n*x)^n / (n! * (1 + 2^n*x)).
a(n) ~ 2^(n^2)/n!. - Vaclav Kotesovec, Jul 02 2016

Extensions

Edited by N. J. A. Sloane, Jan 26 2008

A054923 Triangle read by rows: number of connected graphs with k >= 0 edges and n nodes (1<=n<=k+1).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 2, 3, 0, 0, 0, 1, 5, 6, 0, 0, 0, 1, 5, 13, 11, 0, 0, 0, 0, 4, 19, 33, 23, 0, 0, 0, 0, 2, 22, 67, 89, 47, 0, 0, 0, 0, 1, 20, 107, 236, 240, 106, 0, 0, 0, 0, 1, 14, 132, 486, 797, 657, 235, 0, 0, 0, 0, 0, 9, 138, 814, 2075, 2678, 1806, 551, 0, 0, 0, 0, 0, 5, 126, 1169, 4495, 8548, 8833, 5026, 1301
Offset: 0

Views

Author

Keywords

Comments

The diagonal n = k+1 is A000055(n). - Jonathan Vos Post, Aug 10 2008

Examples

			Triangle begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 1, 2;
  0, 0, 0, 2, 3;
  0, 0, 0, 1, 5   6;
  0, 0, 0, 1, 5, 13,  11;
  0, 0, 0, 0, 4, 19,  33,  23;
  0, 0, 0, 0, 2, 22,  67,  89,  47;
  0, 0, 0, 0, 1, 20, 107, 236, 240, 106;
  ... (so with 5 edges there's 1 graph with 4 nodes, 5 with 5 nodes and 6 with 6 nodes). [Typo corrected by Anders Haglund, Jul 08 2008]
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 93, Table 4.2.2; p. 241, Table A2.

Crossrefs

Main diagonal is A000055.
Subsequent diagonals give the number of connected unlabeled graphs with n nodes and n+k edges for k=0..2: A001429, A001435, A001436.
Cf. A002905 (row sums), A001349 (column sums), A008406, A046751 (transpose), A054924 (transpose), A046742 (w/o left column), A343088 (labeled).

Programs

  • PARI
    InvEulerMT(u)={my(n=#u, p=log(1+x*Ser(u)), vars=variables(p)); Vec(serchop( sum(i=1, n, moebius(i)*substvec(p + O(x*x^(n\i)), vars, apply(v->v^i,vars))/i), 1))}
    permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    edges(v,t) = {prod(i=2, #v, prod(j=1, i-1, my(g=gcd(v[i],v[j])); t(v[i]*v[j]/g)^g )) * prod(i=1, #v, my(c=v[i]); t(c)^((c-1)\2)*if(c%2, 1, t(c/2)))}
    G(n, x)={my(s=0); forpart(p=n, s+=permcount(p)*edges(p,i->1+x^i)); s/n!}
    T(n)={Mat([Col(p+O(y^n), -n) | p<-InvEulerMT(vector(n, k, G(k, y + O(y^n))))])}
    {my(A=T(10)); for(n=1, #A, print(A[n,1..n]))} \\ Andrew Howroyd, Oct 23 2019

Extensions

a(83)-a(89) corrected by Andrew Howroyd, Oct 24 2019
Showing 1-10 of 40 results. Next