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

A361404 Triangle read by rows: T(n,k) is the number of graphs with loops on n unlabeled vertices with k loops.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 6, 6, 4, 11, 20, 28, 20, 11, 34, 90, 148, 148, 90, 34, 156, 544, 1144, 1408, 1144, 544, 156, 1044, 5096, 13128, 20364, 20364, 13128, 5096, 1044, 12346, 79264, 250240, 472128, 580656, 472128, 250240, 79264, 12346
Offset: 0

Views

Author

Andrew Howroyd, Mar 11 2023

Keywords

Comments

T(n,k) is the number of bicolored graphs on n nodes with k vertices having the first color. Adjacent vertices may have the same color.

Examples

			Triangle begins:
     1;
     1,    1;
     2,    2,     2;
     4,    6,     6,     4;
    11,   20,    28,    20,    11;
    34,   90,   148,   148,    90,    34;
   156,  544,  1144,  1408,  1144,   544,  156;
  1044, 5096, 13128, 20364, 20364, 13128, 5096, 1044;
  ...
		

Crossrefs

Columns k=0..2 are A000088, A000666(n-1), A303829.
Row sums are A000666.
Central coefficients are A361405.
Cf. A361361 (cubic).

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)}
    row(n) = {my(s=0); forpart(p=n, s+=permcount(p)*2^edges(p)*prod(i=1, #p, 1 + x^p[i])); Vecrev(s/n!)}

Formula

T(n,k) = T(n, n-k).
Showing 1-1 of 1 results.