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 13 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

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

A061540 Number of connected labeled graphs with n nodes and n+1 edges.

Original entry on oeis.org

0, 0, 0, 6, 205, 5700, 156555, 4483360, 136368414, 4432075200, 154060613850, 5720327205120, 226378594906035, 9523895202838016, 424814409531910125, 20037831121798963200, 996964614369038858060, 52198565072252054814720, 2869621989939313379211204, 165302832533722012508160000
Offset: 1

Views

Author

RAVELOMANANA Vlady (vlad(AT)lri.fr), May 16 2001

Keywords

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 407, Eq. (6.5).

Crossrefs

Programs

  • Maple
    A001864 := proc(n)
        add(binomial(n,s)*s^s*(n-s)^(n-s),s=1..n-1) ;
    end proc:
    A061540 := proc(n)
        (n-1)*(5*n^2+3*n+2)*n^(n-2)-14*A001864(n) ;
        %/24 ;
    end proc: # R. J. Mathar, May 10 2016 see Chapter 6.3 in Bona's Handbook of Combinatorics
  • Mathematica
    max = 18; t[x_] := -ProductLog[-x]; w1[x_] := t[x]^4/24*(6-t[x])/(1-t[x])^3; Drop[ CoefficientList[ Series[ w1[x], {x, 0, max}], x]*Range[0, max]!, 1] (* Jean-François Alcover, Apr 02 2012, after e.g.f. *)
  • Python
    from math import comb
    def A061540(n): return 0 if n<2 else ((n*(n*(5*n - 2) - 1) - 2)*n**(n-2)-14*((sum(comb(n,k)*(n-k)**(n-k)*k**k for k in range(1,(n+1>>1)))<<1) + (0 if n&1 else comb(n,m:=n>>1)*m**n)))//24 # Chai Wah Wu, Apr 26 2023

Formula

E.g.f.: W1(x) := T(x)^4/24 * (6-T(x))/(1-T(x))^3 where T(x) is the e.g.f. for rooted labeled trees (A000169), i.e. T(x) = -LambertW(-x) = x*exp(T(x)).
a(n) ~ 5*n^(n+1)/24 * (1 - 7/5*sqrt(2*Pi/n)). - Vaclav Kotesovec, Jul 09 2013

A061542 Number of connected labeled graphs with n nodes and n+3 edges.

Original entry on oeis.org

0, 0, 0, 0, 45, 4945, 331506, 18602136, 974679363, 50088981600, 2588876118675, 136440380444544, 7389687834858186, 413138671455654144, 23901631262740105875, 1432747304604594800640, 89030607737889046580442, 5735122824857219251863552, 382868741381818853194796754
Offset: 1

Views

Author

RAVELOMANANA Vlady (vlad(AT)lri.fr), May 16 2001

Keywords

Crossrefs

A diagonal of A343088.

Programs

  • Mathematica
    terms = 17; T[x_] = -ProductLog[-x];
    W2[x_] = (1/5760)*T[x]^5*((2160 + 9320*T[x] - 12576*T[x]^2 + 9864*T[x]^3 - 4081*T[x]^4 + 914*T[x]^5 - 76*T[x]^6)/(1 - T[x])^9) + O[x]^(terms+1);
    Drop[CoefficientList[W2[x], x]*Range[0, terms]!, 1](* Jean-François Alcover, Nov 04 2011, updated Jan 11 2018 *)

Formula

E.g.f.: W2(x) = 1/5760*T(x)^5*(2160 + 9320*T(x) - 12576*T(x)^2 + 9864*T(x)^3 - 4081*T(x)^4 + 914*T(x)^5 - 76*T(x)^6)/((1 - T(x))^9), where T(x) is the e.g.f. for rooted labeled trees (A000169), i.e. T(x) = - LambertW( - x) = x*exp(T(x)).
a(n) ~ 221 * n^(n+4) / 24192 * (1 - 2205*sqrt(2*Pi/n)/884). - Vaclav Kotesovec, Jan 11 2018

A061541 Number of connected labeled graphs with n nodes and n+2 edges.

Original entry on oeis.org

0, 0, 0, 1, 120, 6165, 258125, 10230360, 405918324, 16530124800, 699126562530, 30884683104000, 1428626760992860, 69248819808744576, 3516693960681822375, 186964957159176734720, 10395215954531344335000, 603712553730550509035520, 36575888366817680447745924
Offset: 1

Views

Author

RAVELOMANANA Vlady (vlad(AT)lri.fr), May 16 2001

Keywords

Crossrefs

A diagonal of A343088.

Programs

  • Mathematica
    f[x_] = (1/(48*(1 + ProductLog[-x])^6))* ProductLog[-x]^4*(2 - 28*ProductLog[-x] - 23*ProductLog[-x]^2 - 9*ProductLog[-x]^3 - ProductLog[-x]^4); Rest[CoefficientList[Series[f[x], {x, 0, 17}], x]*Range[0, 17]!] (* Jean-François Alcover, Jul 11 2011, after formula *)
  • PARI
    N=66; x='x+O('x^N); /* that many terms */
    T=sum(n=1,N,n^(n-1)/n!*x^n); /* e.g.f. of A000169 */
    egf=1/48*T^4*(2+28*T-23*T^2+9*T^3-T^4)/(1-T)^6;
    Vec(serlaplace(egf)) /* show terms, starting with 1 */
    /* Joerg Arndt, Jul 11 2011 */

Formula

E.g.f.: W2(x) = (1/48)*T(x)^4*(2 + 28*T(x) - 23*T(x)^2 + 9*T(x)^3 - T(x)^4)/(1 - T(x))^6, where T(x) is the e.g.f. for rooted labeled trees (A000169), i.e., T(x) = -LambertW(-x) = x*exp(T(x)).
a(n) ~ 5*n^(n+5/2)*sqrt(2*Pi)/256 * (1 - 56*sqrt(2)/(9*sqrt(Pi*n))). - Vaclav Kotesovec, Apr 06 2014

A061543 Number of connected labeled graphs with n nodes and n+4 edges.

Original entry on oeis.org

0, 0, 0, 0, 10, 2997, 343140, 28044072, 1969994376, 128916045720, 8189607254829, 516895556463000, 32865110582830812, 2123144102136625568, 140115162250240202025, 9478591551140049252096, 658706750876277003711720, 47086655712339052407435264, 3464805563040942592258054518
Offset: 1

Views

Author

Ravelomanana Vlady (vlad(AT)lri.fr), May 16 2001

Keywords

Crossrefs

A diagonal of A343088.

Programs

  • Mathematica
    max=17; t[x_] := -ProductLog[-x]; w4[x_] := -1/11520*t[x]^5*(-960 - 31632*t[x] - 54144*t[x]^2 + 100976*t[x]^3 - 117368*t[x]^4 + 79520*t[x]^5 - 35793*t[x]^6 + 10069*t[x]^7 - 1626*t[x]^8 + 108*t[x]^9) / (-1 + t[x])^12; CoefficientList[ Series[w4[x], {x, 0, max}], x]*Range[0, max]! // Rest (* Jean-François Alcover, Sep 07 2012, from e.g.f. *)

Formula

E.g.f.: W4(x) = - 1/11520*T(x)^5*( - 960 - 31632*T(x) - 54144*T(x)^2 + 100976*T(x)^3 - 117368*T(x)^4 + 79520*T(x)^5 - 35793*T(x)^6 + 10069*T(x)^7 - 1626*T(x)^8 + 108*T(x)^9)/(( - 1 + T(x))^12) where T(x) is the e.g.f. for rooted labeled trees (A000169), i.e., T(x) = - LambertW( - x) = x*exp(T(x)).

A061544 Number of connected labeled graphs with n nodes and n+6 edges.

Original entry on oeis.org

0, 0, 0, 0, 0, 455, 202755, 39183840, 5228627544, 573177986865, 56169415897650, 5157436533796140, 456501786661617840, 39667302684866008152, 3425100498297691978050, 296331952661358892037760, 25839208713048103250144280, 2280203173608621371757204480, 204244225852123476144894896712
Offset: 1

Views

Author

Ravelomanana Vlady (vlad(AT)lri.fr), May 16 2001

Keywords

Crossrefs

A diagonal of A343088.

Programs

  • Mathematica
    t[x_] := -ProductLog[-x]; W6[x_] := -1/5806080*t[x]^6*(-3669120 - 145514880*t[x] - 826813440*t[x]^2 - 160242624*t[x]^3 + 549065304*t[x]^4 - 1423242144*t[x]^5 + 1649073392*t[x]^6 - 1408032768*t[x]^7 + 881917344*t[x]^8 - 418233349*t[x]^9 + 147585749*t[x]^10 - 37755372*t[x]^11 + 6581528*t[x]^12 - 696620*t[x]^13 +33000*t[x]^14)/((-1 + t[x])^18); max = 20; CoefficientList[Series[W6[x], {x, 0, max}], x]*Range[0, max]! // Rest (* G. C. Greubel, Nov 12 2017 *)

Formula

E.g.f.: W6(x) = - 1/5806080*T(x)^6*( - 3669120 - 145514880*T(x) - 826813440*T(x)^2 - 160242624*T(x)^3 + 549065304*T(x)^4 - 1423242144*T(x)^5 + 1649073392*T(x)^6 - 1408032768*T(x)^7 + 881917344*T(x)^8 - 418233349*T(x)^9 + 147585749*T(x)^10 - 37755372*T(x)^11 + 6581528*T(x)^12 - 696620*T(x)^13 + 33000*T(x)^14)/(( - 1 + T(x))^18) where T(x) is the e.g.f. for rooted labeled trees (A000169), i.e., T(x) = -LambertW(-x) = x*exp(T(x)).

A096117 Number of connected labeled graphs with n nodes and n+5 edges.

Original entry on oeis.org

0, 0, 0, 0, 1, 1365, 290745, 35804384, 3431889000, 288982989000, 22716104811840, 1724903317684800, 129165517275377154, 9664573656742964960, 728813888470620552600, 55713446610261097382400, 4334305420045397178746260, 344080024970397555374419968, 27923503603736889921687649020
Offset: 1

Views

Author

Keith Briggs, Aug 09 2004

Keywords

Crossrefs

A diagonal of A343088.
Cf. A057500.

Extensions

Offset corrected and terms a(17) and beyond from Andrew Howroyd, Apr 16 2021

A096150 Number of connected labeled graphs with n nodes and n+7 edges.

Original entry on oeis.org

0, 0, 0, 0, 0, 105, 116175, 37007656, 7032842901, 1016662746825, 125217059384890, 13979620699390500, 1468384747758433362, 148610523724144786304, 14725179052834536611325, 1444367897584925254381440, 141356080305700826710780155, 13881663444819892480039097856
Offset: 1

Views

Author

Keith Briggs, Aug 09 2004

Keywords

Crossrefs

A diagonal of A343088.
Cf. A057500.

Extensions

Offset corrected and terms a(16) and beyond from Andrew Howroyd, Apr 16 2021

A096224 Number of connected labeled graphs with n nodes and n+8 edges.

Original entry on oeis.org

0, 0, 0, 0, 0, 15, 54257, 30258935, 8403710364, 1624745199910, 253717024819170, 34644709397517912, 4336461198140896396, 512755474242717445740, 58441126001104710458595, 6511044113057606391228960, 716247426054164600104429648, 78368395883181612191026677504
Offset: 1

Views

Author

Keith Briggs, Aug 09 2004

Keywords

Crossrefs

A diagonal of A343088.
Cf. A057500.

Extensions

Offset corrected and terms a(16) and beyond from Andrew Howroyd, Apr 16 2021
Showing 1-10 of 13 results. Next