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.

A126122 Number of edge-rooted unlabeled graphs on n nodes.

Original entry on oeis.org

0, 1, 3, 14, 74, 572, 6564, 125120, 4147832, 247183688, 26814414976, 5327509126272, 1946813194004224, 1313879013920844480, 1644521424392726492800, 3833402238753872010743808, 16708198671847617602943683072, 136682601082422255664288717142080
Offset: 1

Views

Author

Vladeta Jovovic, Mar 07 2007

Keywords

Comments

In other words, number of unlabeled graphs on n nodes with a marked edge.

Examples

			a(2)=1: the tree with 2 nodes and a rooted edge. a(3)=3: (i) the linear tree with one of the two edges rooted, (ii) the triangle graph with one of the three edges rooted, (iii) the disconnected graph with a single disconnected node and a tree with 2 nodes and a marked edge. - _R. J. Mathar_, May 01 2018
		

References

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

Crossrefs

Row sums of A126123.

Programs

  • Mathematica
    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_] := (Sum[GCD[v[[i]], v[[j]]], {i, 2, Length@v}, {j, 1, i - 1}] + Total[Quotient[v, 2]]);
    cross[u_, v_] := Sum[GCD[u[[i]], v[[j]]], {i, 1, Length@u}, {j, 1, Length@v}];
    a[n_] := If[n < 2, 0, s = 0; Do[s += permcount[p]*(2^(edges[p])*(2^cross[{1, 1}, p] + 2^cross[{2}, p])), {p, IntegerPartitions[n - 2]}]; s/(2(n - 2)!)];
    Array[a, 20] (* Jean-François Alcover, Jul 07 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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i],v[j]))) + sum(i=1, #v, v[i]\2)}
    cross(u,v) = {sum(i=1, #u, sum(j=1, #v, gcd(u[i],v[j])))}
    a(n) = {if(n<2, 0, my(s=0); forpart(p=n-2, s+=permcount(p)*(2^(edges(p))*(2^cross([1,1],p) + 2^cross([2],p)))); s/(2*(n-2)!))} \\ Andrew Howroyd, May 03 2018