login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
2*a(n) = A304070(n).
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)!];
Array[a, 18] (* Jean-François Alcover, Jul 03 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)}
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
Cf. A000088 (not rooted).
Sequence in context: A187848 A370653 A001715 * A020028 A020118 A009351
KEYWORD
nonn
AUTHOR
Brendan McKay, May 05 2018
EXTENSIONS
Terms a(13) and beyond from Andrew Howroyd, May 06 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 01:44 EDT 2024. Contains 371989 sequences. (Running on oeis4.)