|
|
A304069
|
|
Number of simple graphs on n vertices rooted at one oriented edge.
|
|
5
|
|
|
0, 1, 4, 20, 120, 996, 12208, 241520, 8171936, 491317640, 53489987584, 10642774095040, 3891541970165760, 2627082058057474240, 3288629181834544457216, 7666328470407977450185984, 33415367571344085375628748800, 273361007807597539567353971109952
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
This is also the number of simple graphs rooted at an oriented non-edge.
The graphs do not need to be connected here; see A304072 for the connected graphs.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(3)=4: no contribution from the graph with 3 isolated nodes. 1 case of the connected graph with 2 nodes and an isolated node. 2 cases of the linear graph with 3 nodes (orientation either towards or away from the middle node). 1 case of the triangular graph.
|
|
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[#, 2]& /@ v];
a[n_] := If[n < 2, 0, s = 0; Do[s += permcount[p]*(2^(2*Length[p] + edges[p])), {p, IntegerPartitions[n - 2]}]; s/(n - 2)!];
|
|
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)}
a(n)= {if(n<2, 0, my(s=0); forpart(p=n-2, s+=permcount(p)*(2^(2*#p+edges(p)))); s/(n-2)!)} \\ Andrew Howroyd, May 06 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|