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.

A304222 Triangle T(n,k) read by rows: number of simple connected graphs with n nodes and k endpoints, n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 3, 1, 1, 1, 0, 11, 5, 3, 1, 1, 0, 61, 29, 14, 5, 2, 1, 0, 507, 224, 86, 25, 8, 2, 1, 0, 7442, 2666, 762, 184, 48, 11, 3, 1, 0, 197772, 50779, 10173, 1890, 374, 72, 16, 3, 1, 0, 9808209, 1653431, 220627, 29252, 4252, 660, 115, 20, 4, 1, 0
Offset: 0

Views

Author

R. J. Mathar, May 11 2018

Keywords

Comments

Endpoints are vertices with 0 or 1 (less than 2) edges.

Examples

			The triangle starts in row n=0 with column 0 <= k <= n as:
       1;
       1,     0;
       0,     0,     1;
       1,     0,     1,    0;
       3,     1,     1,    1,   0;
      11,     5,     3,    1,   1,  0;
      61,    29,    14,    5,   2,  1,  0;
     507,   224,    86,   25,   8,  2,  1, 0;
    7442,  2666,   762,  184,  48, 11,  3, 1, 0;
  197772, 50779, 10173, 1890, 374, 72, 16, 3, 1, 0;
		

Crossrefs

Cf. A001349 (row sums), A004108 (first column), A055290 (trees only), A327371.

Programs

  • PARI
    InvEulerMT(u)={my(n=#u, p=log(1+x*Ser(u)), vars=variables(p)); Vec(sum(i=1, n, moebius(i)*substvec(p + 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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2)}
    G(n)={sum(k=0, n, my(s=0); forpart(p=k, s+=permcount(p) * 2^edges(p) * prod(i=1, #p, (1 - x^p[i])/(1 - (x*y)^p[i]) + O(x*x^(n-k)))); x^k*s/k!)}
    T(n)={my(v=InvEulerMT(Vec(G(n)-1))); v[2]=y^2; concat([[1]], vector(#v, n, Vecrev(v[n], n+1))) }
    my(A=T(10)); for(n=1, #A, print(A[n])) \\ Andrew Howroyd, Jan 22 2021

Extensions

Terms a(55) and beyond from Andrew Howroyd, Jan 22 2021