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.

A290428 Array read by antidiagonals: T(n,k) is the number of graphs with n edges and k vertices, allowing loops and multi-edges.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 2, 4, 1, 0, 1, 2, 6, 6, 1, 0, 1, 2, 7, 14, 9, 1, 0, 1, 2, 7, 20, 28, 12, 1, 0, 1, 2, 7, 22, 53, 52, 16, 1, 0, 1, 2, 7, 23, 69, 125, 93, 20, 1, 0, 1, 2, 7, 23, 76, 198, 287, 152, 25, 1, 0, 1, 2, 7, 23, 78, 245, 550, 606, 242, 30, 1, 0
Offset: 0

Views

Author

R. J. Mathar, Jul 31 2017

Keywords

Comments

Variant of A138107, here for non-directed edges.

Examples

			1   1   1   1    1    1    1   1   1...
0   1   2   2    2    2    2   2   2...
0   1   4   6    7    7    7   7   7...
0   1   6  14   20   22   23  23  23...
0   1   9  28   53   69   76  78  79...
0   1  12  52  125  198  245 264 271...
0   1  16  93  287  550  782 915 973...
0   1  20 152  606 1441 2392
0   1  25 242 1226 3611
		

Crossrefs

Cf. A050531 (column 3), A050532 (column 4), A138107, A098568 (vertex-labeled).

Programs

  • Mathematica
    rows = 12;
    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]^g, {i, 2, Length[v]}, {j, 1, i - 1}]*Product[c = v[[i]]; t[c]^Quotient[c + 1, 2]*If[OddQ[c], 1, t[c/2]], {i, 1, Length[v]}];
    col[k_] := col[k] = Module[{s = O[x]^rows}, Do[s += permcount[p]*1/edges[p, 1 - x^# + O[x]^rows&], {p, IntegerPartitions[k]}]; s/k!] // CoefficientList[#, x]&;
    T[0, ] = 1; T[, 0] = 0;
    T[n_, k_] := col[k][[n + 1]];
    Table[T[n-k, k], {n, 0, rows-1}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jan 08 2021, 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)^g )) * prod(i=1, #v, my(c=v[i]); t(c)^((c+1)\2)*if(c%2, 1, t(c/2)))}
    T(m, n=m) = {Mat(vector(n+1, n, my(s=O(x*x^m)); forpart(p=n-1, s+=permcount(p)*1/edges(p,i->1-x^i+O(x*x^m))); Col(s/(n-1)!)))}
    { my(A=T(8)); for(n=1, #A, print(A[n,])) } \\ Andrew Howroyd, Oct 22 2019