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

A052283 Triangle read by rows: T(n,k) is the number of unlabeled directed graphs on n nodes with k arcs, k=0..n*(n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 5, 13, 27, 38, 48, 38, 27, 13, 5, 1, 1, 1, 1, 5, 16, 61, 154, 379, 707, 1155, 1490, 1670, 1490, 1155, 707, 379, 154, 61, 16, 5, 1, 1, 1, 1, 5, 17, 76, 288, 1043, 3242, 8951, 21209, 43863, 78814, 124115, 171024, 207362, 220922, 207362, 171024, 124115, 78814, 43863, 21209, 8951, 3242, 1043, 288, 76, 17, 5, 1, 1
Offset: 0

Views

Author

Vladeta Jovovic, Feb 07 2000

Keywords

Comments

Triangular array read by rows T(n,k) is the number of unlabeled directed graphs (no self loops allowed) on n nodes with exactly k edges where n >= 1, 0 <= k <= n(n-1). - Geoffrey Critzer, Nov 01 2011

Examples

			[1],
[1],
[1,1,1],
[1,1,4,4,4,1,1],
[1,1,5,13,27,38,48,38,27,13,5,1,1];
(the last batch giving the numbers of directed graphs with 4 nodes and from 0 to 12 arcs).
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 247.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 522.

Crossrefs

Cf. A000273 (row sums), A070166, A008406, A003085, A283753 (weakly connected).

Programs

  • Mathematica
    Table[CoefficientList[GraphPolynomial[n, x, Directed], x], {n, 1, 10}] (* Geoffrey Critzer, Nov 01 2011 *)
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_, t_] := Product[g = GCD[v[[i]], v[[j]]]; t[v[[i]]*v[[j]]/g]^(2 g), {i, 2, Length[v]}, {j, 1, i-1}] * Product[ t[v[[i]]]^(v[[i]] - 1), {i, 1, Length[v]}];
    gp[n_] := (s = 0; Do[s += permcount[p]*edges[p, 1 + x^# &], {p, IntegerPartitions[n]}]; s/n!);
    A052283 = Reap[For[n = 1, n <= 6, n++, p = gp[n]; For[k = 0, k <= Exponent[p, x], k++, Sow[Coefficient[p, x, k]]]]][[2, 1]] (* Jean-François Alcover, Jul 09 2018, after Andrew Howroyd *)
  • PARI
    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)^(2*g))) * prod(i=1, #v, t(v[i])^(v[i]-1))}
    gp(n) = {my(s=0); forpart(p=n, s+=permcount(p)*edges(p,i->1+x^i)); s/n!}
    for(n=1, 6, my(p=gp(n)); for(k=0, poldegree(p), print1(polcoeff(p,k), ", ")); print); \\ Andrew Howroyd, Nov 05 2017

Formula

T(n,0) = T(n,1) = T(n,n(n-1)-1) = T(n,n) = 1. - Geoffrey Critzer, Nov 01 2011
T(2k,k) = T(2k+1,k) = T(2k+2,k) =... and is the maximum value of column k. - Geoffrey Critzer, Nov 01 2011

Extensions

a(0)=1 prepended and terms a(62) and beyond from Andrew Howroyd, Apr 20 2020

A054733 Triangle of number of (weakly) connected unlabeled digraphs with n nodes and k arcs (n >=2, k >= 1).

Original entry on oeis.org

1, 1, 0, 3, 4, 4, 1, 1, 0, 0, 8, 22, 37, 47, 38, 27, 13, 5, 1, 1, 0, 0, 0, 27, 108, 326, 667, 1127, 1477, 1665, 1489, 1154, 707, 379, 154, 61, 16, 5, 1, 1, 0, 0, 0, 0, 91, 582, 2432, 7694, 19646, 42148, 77305, 122953, 170315, 206982, 220768, 207301, 171008
Offset: 2

Views

Author

Vladeta Jovovic, Apr 21 2000

Keywords

Examples

			1,1;
0,3,4,4,1,1;
0,0,8,22,37,47,38,27,13,5,1,1;
the last batch giving the numbers of connected digraphs with 4 nodes and from 1 to 12 arcs.
		

References

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

Crossrefs

Cf. A000238 (leading diagonal), A003085 (row sums), A053454 (column sums), A062735 (labeled).
Cf. A052283 (not necessarily connected), A283753 (another version), A057276 (strongly connected), A350789 (transpose).

Programs

  • PARI
    InvEulerMTS(p)={my(n=serprec(p,x)-1, q=log(p), vars=variables(p)); sum(i=1, n, moebius(i)*substvec(q + O(x*x^(n\i)), vars, apply(v->v^i,vars))/i)}
    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)^(2*g) )) * prod(i=1, #v, my(c=v[i]); t(c)^(c-1))}
    G(n, x)={my(s=0); forpart(p=n, s+=permcount(p)*edges(p, i->1+x^i)); s/n!}
    row(n)={Vecrev(polcoef(InvEulerMTS(sum(i=0, n, G(i, y)*x^i, O(x*x^n))), n)/y)}
    { for(n=2, 6, print(row(n))) } \\ Andrew Howroyd, Jan 28 2022
Showing 1-2 of 2 results.