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.

A304311 Triangle T(n,k) read by rows: number of bicolored connected graphs with n nodes and k nodes of the first color.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 3, 2, 6, 11, 16, 11, 6, 21, 58, 98, 98, 58, 21, 112, 407, 879, 1087, 879, 407, 112, 853, 4306, 11260, 17578, 17578, 11260, 4306, 853, 11117, 72489, 230505, 436371, 537272, 436371, 230505, 72489, 11117
Offset: 0

Views

Author

R. J. Mathar, May 10 2018

Keywords

Examples

			Triangle begins
      1;
      1,     1;
      1,     1,      1;
      2,     3,      3,      2;
      6,    11,     16,     11,      6;
     21,    58,     98,     98,     58,     21;
    112,   407,    879,   1087,    879,    407,    112;
    853,  4306,  11260,  17578,  17578,  11260,   4306,   853;
  11117, 72489, 230505, 436371, 537272, 436371, 230505, 72489, 11117;
		

Crossrefs

Cf. A054921 (row sums), A001349 (1st column), A126100 (2nd column), A303831 (3rd column), A294783 (trees).

Programs

  • 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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2)}
    S(n,y)={my(s=0); forpart(p=n, s+=permcount(p)*2^edges(p)*prod(i=1,#p,1+y^p[i])); s/n!}
    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) )}
    {my(A=InvEulerMT(vector(10, n, S(n,y)))); for(n=0, #A, for(k=0, n, print1(polcoeff(if(n,A[n],1), k), ", ")); print)} \\ Andrew Howroyd, May 13 2018

Formula

T(n,k) = T(n,n-k).