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 156 results. Next

A327078 Binomial transform of A001187 (labeled connected graphs), if we assume A001187(1) = 0.

Original entry on oeis.org

1, 1, 2, 8, 61, 969, 31738, 2069964, 267270033, 68629753641, 35171000942698, 36024807353574280, 73784587576805254653, 302228602363365451957793, 2475873310144021668263093202, 40564787336902311168400640561084
Offset: 0

Views

Author

Gus Wiseman, Aug 25 2019

Keywords

Comments

Here we consider that there is no nonempty connected graph with one vertex (different from A001187 and A182100).

Examples

			The a(0) = 1 through a(3) = 8 edge-sets:
  {}  {}  {}       {}
          {{1,2}}  {{1,2}}
                   {{1,3}}
                   {{2,3}}
                   {{1,2},{1,3}}
                   {{1,2},{2,3}}
                   {{1,3},{2,3}}
                   {{1,2},{1,3},{2,3}}
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, 2^(n*(n-1)/2)-add(
          k*binomial(n, k)*2^((n-k)*(n-k-1)/2)*b(k), k=1..n-1)/n)
        end:
    a:= n-> add(b(n-j)*binomial(n, j), j=0..n-2)+1:
    seq(a(n), n=0..18);  # Alois P. Heinz, Aug 27 2019
  • Mathematica
    csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,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}]],Length[csm[#]]<=1&]],{n,0,5}]

Formula

a(n) = A182100(n) - n.
a(n) = A287689(n) + 1.

A056066 Expansion of log( dC(x)/dx ), C(x) = e.g.f. for labeled connected graphs (A001187).

Original entry on oeis.org

0, 1, 3, 28, 570, 22568, 1682352, 237014512, 64144890960, 33877404737792, 35289907832496768, 72958473002707495168, 300387071466709317941760, 2467720611903398552604259328, 40493022471111759715270671578112, 1327970521286614645847457853386207232
Offset: 0

Views

Author

N. J. A. Sloane, Jul 29 2000

Keywords

Comments

a(n) is the number of connected simple labeled graphs G on {1,2,...,n+1} such that G is still connected upon removal of the vertex n+1. Equivalently, a(n) is the number of ways to form a connected simple labeled graph on {1,2,...,n} and then select a nonempty subset of its vertices. This statement translates immediately via the symbolic method into the e.g.f. given below. - Geoffrey Critzer, Sep 09 2013

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 16, Eq. (1.3.3).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, 2^(n*(n-1)/2)-
          add(k*binomial(n, k)* 2^((n-k)*(n-k-1)/2)*b(k), k=1..n-1)/n)
        end:
    a:= proc(n) option remember; `if`(n=0, 0, b(n+1)-
          add(k*binomial(n, k)*b(n+1-k)*a(k), k=1..n-1)/n)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 09 2013
  • Mathematica
    nn=14;f[x_]:=Log[Sum[2^Binomial[n,2]x^n/n!,{n,0,nn}]]+1;Range[0,nn]!CoefficientList[Series[f[2x]-f[x],{x,0,nn}],x] (* Geoffrey Critzer, Sep 09 2013 *)

Formula

E.g.f.: A(2x) - A(x) where A(x) is the e.g.f. for A001187. - Geoffrey Critzer, Sep 09 2013

A360603 Triangle read by rows. T(n, k) = A360604(n, k) * A001187(k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 4, 0, 8, 6, 12, 38, 0, 64, 32, 48, 152, 728, 0, 1024, 320, 320, 760, 3640, 26704, 0, 32768, 6144, 3840, 6080, 21840, 160224, 1866256, 0, 2097152, 229376, 86016, 85120, 203840, 1121568, 13063792, 251548592
Offset: 0

Views

Author

Peter Luschny, Feb 20 2023

Keywords

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0,       1;
[2] 0,       1,      1;
[3] 0,       2,      2,     4;
[4] 0,       8,      6,    12,    38;
[5] 0,      64,     32,    48,   152,    728;
[6] 0,    1024,    320,   320,   760,   3640,   26704;
[7] 0,   32768,   6144,  3840,  6080,  21840,  160224,  1866256;
[8] 0, 2097152, 229376, 86016, 85120, 203840, 1121568, 13063792, 251548592.
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973.

Crossrefs

Cf. A006125 Graphs on n labeled nodes, T(n+1, 1) and Sum_{k=0..n} T(n, k).
Cf. A054592 Disconnected labeled graphs with n nodes, Sum_{k=0..n-1} T(n, k).
Cf. A001187 Connected labeled graphs with n nodes, T(n, n).
Cf. A123903 Isolated nodes in all simple labeled graphs on n nodes, T(n+2, 2).
Cf. A053549 Labeled rooted connected graphs, T(n+1, n).
Cf. A275462 Leaves in all simple labeled connected graphs on n nodes T(n+2, n).
Cf. A060818 gcd_{k=0..n} T(n, k) = gcd(n!, 2^n).
Cf. A143543 Labeled graphs on n nodes with k connected components.
Cf. A095340 Total number of nodes in all labeled graphs on n nodes.
Cf. A360604, A360860 (accumulation triangle).

Programs

  • Maple
    T := (n, k) -> 2^binomial(n-k, 2)*binomial(n-1, k-1)*A001187(k):
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Based on the recursion:
    Trow := proc(n) option remember; if n = 0 then return [1] fi;
    seq(2^binomial(n-k, 2) * binomial(n-1, k-1) * Trow(k)[k+1], k = 1..n-1);
    2^(n*(n-1)/2) - add(j, j = [%]); [0, %%, %] end:
    seq(print(Trow(n)), n = 0..8);
  • Mathematica
    A001187[n_] := A001187[n] = 2^((n - 1)*n/2) - Sum[Binomial[n - 1, k]*2^((k - n + 1)*(k - n + 2)/2)*A001187[k + 1], {k, 0, n - 2}];
    T[n_, k_] := 2^Binomial[n - k, 2]*Binomial[n - 1, k - 1]*A001187[k];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 02 2023, after Peter Luschny in A001187 *)
  • Python
    from math import comb as binomial
    from functools import cache
    @cache
    def A360603Row(n: int) -> list[int]:
        if n == 0: return [1]
        s = [2 ** (((k - n + 1) * (k - n)) // 2) * binomial(n - 1, k - 1) * A360603Row(k)[k] for k in range(1, n)]
        b = 2 ** (((n - 1) * n) // 2) - sum(s)
        return [0] + s + [b]

Formula

T(n, k) = 2^binomial(n-k, 2)*binomial(n-1, k-1) * A001187(k).
Recursion over the rows of the triangle: Set row(0) = [1] where [.] denotes a 0-based list. Assume now all rows(j) for j < n computed, next compute r = [2^binomial(n-k, 2) * binomial(n-1, k-1) * row(k)[k] for k = 1..n-1] and s = 2^(n*(n-1)/2) - Sum(r). Then row(n) = [0] & r & [s], where '&' denotes the concatenation of lists. (See the Python program for an implementation.)
T(n, n) = A001187(n) (connected labeled graphs).
T(n-1, n) = A053549(n-1) for n >= 1 (labeled rooted connected graphs).
T(n, 1) = Sum_{k>=0} T(n-1, k) = A006125(n-1) for n >= 1 (all labeled graphs).
Sum_{k=0..n-1} T(n, k) = A054592(n) for n >= 1 (disconnected labeled graphs).
See additional formulas in the cross-references.

A006125 a(n) = 2^(n*(n-1)/2).

Original entry on oeis.org

1, 1, 2, 8, 64, 1024, 32768, 2097152, 268435456, 68719476736, 35184372088832, 36028797018963968, 73786976294838206464, 302231454903657293676544, 2475880078570760549798248448, 40564819207303340847894502572032, 1329227995784915872903807060280344576
Offset: 0

Views

Author

Keywords

Comments

Number of graphs on n labeled nodes; also number of outcomes of labeled n-team round-robin tournaments.
Number of perfect matchings of order n Aztec diamond. [see Speyer]
Number of Gelfand-Zeitlin patterns with bottom row [1,2,3,...,n]. [Zeilberger]
For n >= 1 a(n) is the size of the Sylow 2-subgroup of the Chevalley group A_n(2) (sequence A002884). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 30 2001
From James Propp: (Start)
a(n) is the number of ways to tile the region
o-----o
|.....|
o--o.....o--o
|...........|
o--o...........o--o
|.................|
o--o.................o--o
|.......................|
|.......................|
|.......................|
o--o.................o--o
|.................|
o--o...........o--o
|...........|
o--o.....o--o
|.....|
o-----o
(top-to-bottom distance = 2n) with dominoes like either of
o--o o-----o
|..| or |.....|
|..| o-----o
|..|
o--o
(End)
The number of domino tilings in A006253, A004003, A006125 is the number of perfect matchings in the relevant graphs. There are results of Jockusch and Ciucu that if a planar graph has a rotational symmetry then the number of perfect matchings is a square or twice a square - this applies to these 3 sequences. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 12 2001
Let M_n denotes the n X n matrix with M_n(i,j)=binomial(2i,j); then det(M_n)=a(n+1). - Benoit Cloitre, Apr 21 2002
Smallest power of 2 which can be expressed as the product of n distinct numbers (powers of 2), e.g., a(4) = 1024 = 2*4*8*16. Also smallest number which can be expressed as the product of n distinct powers. - Amarnath Murthy, Nov 10 2002
The number of binary relations that are both reflexive and symmetric on an n-element set. - Justin Witt (justinmwitt(AT)gmail.com), Jul 12 2005
The number of symmetric binary relations on an (n-1)-element set. - Peter Kagey, Feb 13 2021
To win a game, you must flip n+1 heads in a row, where n is the total number of tails flipped so far. Then the probability of winning for the first time after n tails is A005329 / A006125. The probability of having won before n+1 tails is A114604 / A006125. - Joshua Zucker, Dec 14 2005
a(n) = A126883(n-1)+1. - Zerinvary Lajos, Jun 12 2007
Equals right border of triangle A158474 (unsigned). - Gary W. Adamson, Mar 20 2009
a(n-1) is the number of simple labeled graphs on n nodes such that every node has even degree. - Geoffrey Critzer, Oct 21 2011
a(n+1) is the number of symmetric binary matrices of size n X n. - Nathan J. Russell, Aug 30 2014
Let T_n be the n X n matrix with T_n(i,j) = binomial(2i + j - 3, j-1); then det(T_n) = a(n). - Tony Foster III, Aug 30 2018
k^(n*(n-1)/2) is the determinant of n X n matrix T_(i,j) = binomial(k*i + j - 3, j-1), in this case k=2. - Tony Foster III, May 12 2019
Let B_n be the n+1 X n+1 matrix with B_n(i, j) = Sum_{m=max(0, j-i)..min(j, n-i)} (binomial(i, j-m) * binomial(n-i, m) * (-1)^m), 0<=i,j<=n. Then det B_n = a(n+1). Also, deleting the first row and any column from B_n results in a matrix with determinant a(n). The matrices B_n have the following property: B_n * [x^n, x^(n-1) * y, x^(n-2) * y^2, ..., y^n]^T = [(x-y)^n, (x-y)^(n-1) * (x+y), (x-y)^(n-2) * (x+y)^2, ..., (x+y)^n]^T. - Nicolas Nagel, Jul 02 2019
a(n) is the number of positive definite (-1,1)-matrices of size n X n. - Eric W. Weisstein, Jan 03 2021
a(n) is the number of binary relations on a labeled n-set that are both total and antisymmetric. - José E. Solsona, Feb 05 2023

Examples

			From _Gus Wiseman_, Feb 11 2021: (Start)
This sequence counts labeled graphs on n vertices. For example, the a(0) = 1 through a(2) = 8 graph edge sets are:
  {}  {}  {}    {}
          {12}  {12}
                {13}
                {23}
                {12,13}
                {12,23}
                {13,23}
                {12,13,23}
This sequence also counts labeled graphs with loops on n - 1 vertices. For example, the a(1) = 1 through a(3) = 8 edge sets are the following. A loop is represented as an edge with two equal vertices.
  {}  {}    {}
      {11}  {11}
            {12}
            {22}
            {11,12}
            {11,22}
            {12,22}
            {11,12,22}
(End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 547 (Fig. 9.7), 573.
  • G. Everest, A. van der Poorten, I. Shparlinski, and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; p. 178.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 517.
  • F. Harary, Graph Theory. Addison-Wesley, Reading, MA, 1969, p. 178.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 3, Eq. (1.1.2).
  • J. Propp, Enumeration of matchings: problems and progress, in: New perspectives in geometric combinatorics, L. Billera et al., eds., Mathematical Sciences Research Institute series, vol. 38, Cambridge University Press, 1999.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000568 for the unlabeled analog, A053763, A006253, A004003.
Cf. A001187 (connected labeled graphs).
Cf. A158474. - Gary W. Adamson, Mar 20 2009
Cf. A136652 (log). - Paul D. Hanna, Dec 04 2009
The unlabeled version is A000088, or A002494 without isolated vertices.
The directed version is A002416.
The covering case is A006129.
The version for hypergraphs is A058891, or A016031 without singletons.
Row sums of A143543.
The case of connected edge set is A287689.

Programs

Formula

Sequence is given by the Hankel transform of A001003 (Schroeder's numbers) = 1, 1, 3, 11, 45, 197, 903, ...; example: det([1, 1, 3, 11; 1, 3, 11, 45; 3, 11, 45, 197; 11, 45, 197, 903]) = 2^6 = 64. - Philippe Deléham, Mar 02 2004
a(n) = 2^floor(n^2/2)/2^floor(n/2). - Paul Barry, Oct 04 2004
G.f. satisfies: A(x) = 1 + x*A(2x). - Paul D. Hanna, Dec 04 2009
a(n) = 2 * a(n-1)^2 / a(n-2). - Michael Somos, Dec 30 2012
G.f.: G(0)/x - 1/x, where G(k) = 1 + 2^(k-1)*x/(1 - 1/(1 + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 26 2013
E.g.f. satisfies A'(x) = A(2x). - Geoffrey Critzer, Sep 07 2013
Sum_{n>=1} 1/a(n) = A299998. - Amiram Eldar, Oct 27 2020
a(n) = s_lambda(1,1,...,1) where s is the Schur polynomial in n variables and lambda is the partition (n,n-1,n-2,...,1). - Leonid Bedratyuk, Feb 06 2022
a(n) = Product_{1 <= j <= i <= n-1} (i + j)/(2*i - 2*j + 1). Cf. A007685. - Peter Bala, Oct 25 2024

Extensions

More terms from Vladeta Jovovic, Apr 09 2000

A002494 Number of n-node graphs without isolated nodes.

Original entry on oeis.org

1, 0, 1, 2, 7, 23, 122, 888, 11302, 262322, 11730500, 1006992696, 164072174728, 50336940195360, 29003653625867536, 31397431814147073280, 63969589218557753586160, 245871863137828405125824848, 1787331789281458167615194471072, 24636021675399858912682459613241920
Offset: 0

Views

Author

Keywords

Comments

Number of unlabeled simple graphs covering n vertices. - Gus Wiseman, Aug 02 2018

Examples

			From _Gus Wiseman_, Aug 02 2018: (Start)
Non-isomorphic representatives of the a(4) = 7 graphs:
  (12)(34)
  (12)(13)(14)
  (12)(13)(24)
  (12)(13)(14)(23)
  (12)(13)(24)(34)
  (12)(13)(14)(23)(24)
  (12)(13)(14)(23)(24)(34)
(End)
		

References

  • F. Harary, Graph Theory. Addison-Wesley, Reading, MA, 1969, p. 214.
  • W. L. Kocay, Some new methods in reconstruction theory, Combinatorial Mathematics IX, 952 (1982) 89--114. [From Benoit Jubin, Sep 06 2008]
  • W. L. Kocay, On reconstructing spanning subgraphs, Ars Combinatoria, 11 (1981) 301--313. [From Benoit Jubin, Sep 06 2008]
  • J. H. Redfield, The theory of group-reduced distributions, Amer. J. Math., 49 (1927), 433-435; reprinted in P. A. MacMahon, Coll. Papers I, pp. 805-827.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals first differences of A000088. Cf. A006129 (labeled), A001349 (connected, inv. Euler Transf).

Programs

  • Maple
    b:= proc(n, i, l) `if`(n=0 or i=1, 1/n!*2^((p-> add(ceil((p[j]-1)/2)
          +add(igcd(p[k], p[j]), k=1..j-1), j=1..nops(p)))([l[], 1$n])),
           add(b(n-i*j, i-1, [l[], i$j])/j!/i^j, j=0..n/i))
        end:
    a:= n-> b(n$2, [])-`if`(n>0, b(n-1$2, []), 0):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 14 2019
  • Mathematica
    << MathWorld`Graphs`
    Length /@ (gp = Select[ #, GraphicalPartitionQ] & /@
    Graphs /@ Range[9])
    nn = 20; g = Sum[NumberOfGraphs[n] x^n, {n, 0, nn}]; CoefficientList[Series[ g (1 - x), {x, 0, nn}], x]  (*Geoffrey Critzer, Apr 14 2012*)
    sysnorm[m_]:=If[Union@@m!=Range[Max@@Flatten[m]],sysnorm[m/.Rule@@@Table[{(Union@@m)[[i]],i},{i,Length[Union@@m]}]],First[Sort[sysnorm[m,1]]]];
    sysnorm[m_,aft_]:=If[Length[Union@@m]<=aft,{m},With[{mx=Table[Count[m,i,{2}],{i,Select[Union@@m,#>=aft&]}]},Union@@(sysnorm[#,aft+1]&/@Union[Table[Map[Sort,m/.{par+aft-1->aft,aft->par+aft-1},{0,1}],{par,First/@Position[mx,Max[mx]]}]])]];
    Table[Length[Union[sysnorm/@Select[Subsets[Select[Subsets[Range[n]],Length[#]==2&]],Union@@#==Range[n]&]]],{n,6}] (* Gus Wiseman, Aug 02 2018 *)
    b[n_, i_, l_] := If[n==0 || i==1, 1/n!*2^(Function[p, Sum[Ceiling[(p[[j]]-1)/2] + Sum[GCD[p[[k]], p[[j]]], {k, 1, j-1}], {j, 1, Length[p]}]][Join[l, Table[1, {n}]]]), Sum[b[n-i*j, i-1, Join[l, Table[i, {j}]]]/j!/i^j, {j, 0, n/i}]];
    a[n_] := b[n, n, {}] - If[n > 0, b[n-1, n-1, {}], 0];
    a /@ Range[0, 20] (* Jean-François Alcover, Dec 03 2019, after Alois P. Heinz *)
  • Python
    from itertools import combinations
    from math import prod, factorial, gcd
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A002494(n): return int(sum(Fraction(1<>1)*r+(q*r*(r-1)>>1) for q,r in p.items()),prod(q**r*factorial(r) for q,r in p.items())) for p in partitions(n))-sum(Fraction(1<>1)*r+(q*r*(r-1)>>1) for q,r in p.items()),prod(q**r*factorial(r) for q,r in p.items())) for p in partitions(n-1))) if n else 1 # Chai Wah Wu, Jul 03 2024

Formula

O.g.f.: (1-x)*G(x) where G(x) is o.g.f. for A000088. - Geoffrey Critzer, Apr 14 2012
a(n) = A327075(n)+A001349(n). - R. J. Mathar, Nov 21 2023

Extensions

More terms from Vladeta Jovovic, Apr 10 2000
a(0) added from David W. Wilson, Aug 24 2008

A323818 Number of connected set-systems covering n vertices.

Original entry on oeis.org

1, 1, 4, 96, 31840, 2147156736, 9223372011084915712, 170141183460469231602560095199828453376, 57896044618658097711785492504343953923912733397452774312021795134847892828160
Offset: 0

Views

Author

Gus Wiseman, Jan 30 2019

Keywords

Comments

Unlike the nearly identical sequence A092918, this sequence does not count under a(1) the a single-vertex hypergraph with no edges.

Examples

			The a(2) = 4 set-systems:
  {{1, 2}}
  {{1}, {1,2}}
  {{2}, {1,2}}
  {{1}, {2}, {1,2}}
		

Crossrefs

Cf. A001187, A003465 (not necessarily connected), A016031, A048143, A092918, A293510, A317672, A323816, A323817 (no singletons), A323819 (unlabeled case).

Programs

  • Magma
    m:=12;
    f:= func< x | 1-x + Log( (&+[2^(2^n-1)*x^n/Factorial(n): n in [0..m+2]]) ) >;
    R:=PowerSeriesRing(Rationals(), m);
    Coefficients(R!(Laplace( f(x) ))); // G. C. Greubel, Oct 04 2022
    
  • Maple
    b:= n-> add(binomial(n, k)*2^(2^(n-k)-1)*(-1)^k, k=0..n):
    a:= proc(n) option remember; b(n)-`if`(n=0, 0, add(
           k*binomial(n, k)*b(n-k)*a(k), k=1..n-1)/n)
        end:
    seq(a(n), n=0..8);  # Alois P. Heinz, Jan 30 2019
  • Mathematica
    nn=8;
    ser=Sum[2^(2^n-1)*x^n/n!,{n,0,nn}];
    Table[SeriesCoefficient[1-x+Log[ser],{x,0,n}]*n!,{n,0,nn}]
  • SageMath
    m=12;
    def f(x): return 1-x + log(sum(2^(2^n-1)*x^n/factorial(n) for n in range(m+2)))
    def A_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( f(x) ).egf_to_ogf().list()
    A_list(m) # G. C. Greubel, Oct 04 2022

Formula

E.g.f.: 1 - x + log(Sum_{n >= 0} 2^(2^n-1) * x^n/n!).
Logarithmic transform of A003465.

A133686 Number of labeled n-node graphs with at most one cycle in each connected component.

Original entry on oeis.org

1, 1, 2, 8, 57, 608, 8524, 145800, 2918123, 66617234, 1704913434, 48300128696, 1499864341015, 50648006463048, 1847622972848648, 72406232075624192, 3033607843748296089, 135313823447621913500, 6402077421524339766058, 320237988317922139148736
Offset: 0

Views

Author

Washington Bomfim, May 12 2008

Keywords

Comments

The total number of those graphs of order 5 is 608. The number of forests of trees on n labeled nodes of order 5 is 291, so the majority of the graphs of that kind have one or more unicycles.
Also the number of labeled graphs with n vertices satisfying a strict version of the axiom of choice. The axiom of choice says that, given any set of nonempty sets Y, it is possible to choose a set containing an element from each. The strict version requires this set to have the same cardinality as Y, meaning no element is chosen more than once. The connected case is A129271, complement A140638. The unlabeled version is A134964. - Gus Wiseman, Dec 22 2023

Examples

			Below we see the 7 partitions of n=5 in the form c_1 + 2c_2 + ... + nc_n followed by the corresponding number of graphs. We consider the values of A129271(j) given by the table
   j|1|2|3| 4|  5|
----+-+-+-+--+---+
a(j)|1|1|4|31|347|
1*5 -> 5!1^5 / (1!^5 * 5!) = 1
2*1 + 1*3 -> 5!1^1 * 1^3 / (2!^1 * 1! * 1!^3 * 3!) = 10
2*2 + 1*1 -> 5!1^2 * 1^1 / (2!^2 * 2! * 1!^1 * 1!) = 15
3*1 + 1*2 -> 5!4^1 * 1^2 / (3!^1 * 1! * 1!^2 * 2!) = 40
3*1 + 2*1 -> 5!4^1 * 1^1 / (3!^1 * 1! * 2!^1 * 1!) = 40
4*1 + 1*1 -> 5!31^1 * 1^1 / (4!^1 * 1! * 1!^1 * 1!) = 155
5*1 -> 5!347^1 / (5!^1 * 1!) = 347
Total 608
		

Crossrefs

Row sums of triangle A144228. - Alois P. Heinz, Sep 15 2008
Cf. A137352. - Vladeta Jovovic, Sep 16 2008
The unlabeled version is A134964.
The complement is counted by A367867, covering A367868, connected A140638.
The covering case is A367869, connected A129271.
For set-systems we have A367902, ranks A367906.
The complement for set-systems is A367903, ranks A367907.
A006125 counts graphs, A000088 unlabeled.
A006129 counts covering graphs, A002494 unlabeled.
A143543 counts graphs by number of connected components.

Programs

  • Maple
    cy:= proc(n) option remember; binomial(n-1, 2)*
            add((n-3)!/(n-2-t)! *n^(n-2-t), t=1..n-2)
         end:
    T:= proc(n,k) option remember;
          if k=0 then 1
        elif k<0 or n add(T(n,k), k=0..n):
    seq(a(n), n=0..20); # Alois P. Heinz, Sep 15 2008
  • Mathematica
    nn=20;t=Sum[n^(n-1)x^n/n!,{n,1,nn}];Range[0,nn]!CoefficientList[ Series[ Exp[t/2-3t^2/4]/(1-t)^(1/2),{x,0,nn}],x] (* Geoffrey Critzer, Sep 05 2012 *)
    Table[Length[Select[Subsets[Subsets[Range[n], {2}]],Select[Tuples[#], UnsameQ@@#&]!={}&]],{n,0,5}] (* Gus Wiseman, Dec 22 2023 *)
  • PARI
    x='x+O('x^50); Vec(serlaplace(sqrt(-lambertw(-x)/(x*(1+ lambertw(-x))))*exp(-(3/4)*lambertw(-x)^2))) \\ G. C. Greubel, Nov 16 2017

Formula

a(0) = 1; for n >=1, a(n) = Sum of n!prod_{j=1}^n\{ frac{ A129271(j)^{c_j} } { j!^{c_j}c_j! } } over all the partitions of n, c_1 + 2c_2 + ... + nc_n; c_1, c_2, ..., c_n >= 0.
a(n) = Sum_{k=0..n} A144228(n,k). - Alois P. Heinz, Sep 15 2008
E.g.f.: sqrt(-LambertW(-x)/(x*(1+LambertW(-x))))*exp(-3/4 * LambertW(-x)^2). - Vladeta Jovovic, Sep 16 2008
E.g.f.: A(x)*B(x) where A(x) is the e.g.f. for A137916 and B(x) is the e.g.f. for A001858. - Geoffrey Critzer, Mar 23 2013
a(n) ~ 2^(-1/4) * Gamma(3/4) * exp(-1/4) * n^(n-1/4) / sqrt(Pi) * (1-7*Pi/(12*Gamma(3/4)^2*sqrt(n))). - Vaclav Kotesovec, Oct 08 2013
E.g.f.: exp(B(x) - 1) where B(x) is the e.g.f. of A129271. - Andrew Howroyd, Dec 30 2023

Extensions

Corrected and extended by Alois P. Heinz and Vladeta Jovovic, Sep 15 2008

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

A367867 Number of labeled simple graphs with n vertices contradicting a strict version of the axiom of choice.

Original entry on oeis.org

0, 0, 0, 0, 7, 416, 24244, 1951352, 265517333, 68652859502, 35182667175398, 36028748718835272, 73786974794973865449, 302231454853009287213496, 2475880078568912926825399800, 40564819207303268441662426947840, 1329227995784915869870199216532048487
Offset: 0

Views

Author

Gus Wiseman, Dec 07 2023

Keywords

Comments

The axiom of choice says that, given any set of nonempty sets Y, it is possible to choose a set containing an element from each. The strict version requires this set to have the same cardinality as Y, meaning no element is chosen more than once.
In the connected case, these are just graphs with more than one cycle.

Examples

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

Crossrefs

The complement is A133686, connected A129271, covering A367869.
The connected case is A140638 (graphs with more than one cycle).
The covering case is A367868.
For set-systems we have A367903, ranks A367907.
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.
A143543 counts simple labeled graphs by number of connected components.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Subsets[Range[n],{2}]], Select[Tuples[#],UnsameQ@@#&]=={}&]],{n,0,5}]

Formula

a(n) = A006125(n) - A133686(n). - Andrew Howroyd, Dec 30 2023

Extensions

Terms a(7) and beyond from Andrew Howroyd, Dec 30 2023

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