OFFSET
1,3
COMMENTS
In other words, number of unlabeled graphs on n nodes with a marked edge.
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
EXAMPLE
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
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Mar 07 2007
STATUS
approved