A126122 Number of edge-rooted unlabeled graphs on n nodes.
0, 1, 3, 14, 74, 572, 6564, 125120, 4147832, 247183688, 26814414976, 5327509126272, 1946813194004224, 1313879013920844480, 1644521424392726492800, 3833402238753872010743808, 16708198671847617602943683072, 136682601082422255664288717142080
Offset: 1
Keywords
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.
Links
- Vladeta Jovovic, Table of n, a(n) for n = 1..40
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
Comments