|
|
A303830
|
|
The number of edge-rooted unlabeled connected graphs with n nodes.
|
|
4
|
|
|
0, 1, 2, 10, 56, 477, 5879, 117729, 4014125, 242887444, 26562628943, 5300430360196, 1941457570816837, 1311926679135555495, 1643205542452252078848, 3831756372376104769454402, 16704363592309800046798746041, 136665888984665718748205681747780
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(4)=10: The quadrangle with 1 choice of rooting. The star graph with 1 choice. The triangle with one protruding edge with 3 choices. The quadrangle with a diagonal with 2 choices. The tretrahedron graph with 1 choice. The linear tree with 2 choices (middle or end edge).
|
|
MATHEMATICA
|
nmax = 20;
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}];
a22[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)!)];
a88[n_] := Module[{s = 0}, Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!];
A[x_] = Sum[a22[n] x^n, {n, 0, nmax}] / Sum[a88[n] x^n, {n, 0, nmax}] + O[x]^nmax;
|
|
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])))}
gs(N, u) = {1+x*Ser(vector(N, n, my(s=0); forpart(p=n, s+=permcount(p)*(2^(edges(p)+cross(u, p)))); s/n!))}
seq(n)={concat([0], Vec((gs(n, [1, 1]) + gs(n, [2]))/(2*gs(n, []))))} \\ Andrew Howroyd, May 04 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|