OFFSET
1,3
COMMENTS
Given two integers p, q, one can count the different graphs having p vertices and q edges by the standard Polya counting technique. Our sequence is then obtained by summing up the terms with p + q = n.
FORMULA
a(n) = Sum_{i=1..n} A008406(i, n-i). - Andrew Howroyd, Nov 07 2019
EXAMPLE
a(3) = 2 because there is a graph with 3 vertices and no edges and a graph with 2 vertices and one edge.
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_, t_] := Product[Product[g = GCD[v[[i]], v[[j]]]; t[v[[i]]*v[[j]]/g]^g, {j, 1, i - 1}], {i, 2, Length[v]}]*Product[c = v[[i]]; t[c]^Quotient[c-1, 2]*If[OddQ[c], 1, t[c/2]], {i, 1, Length[v]}];
row[n_] := row[n] = Module[{s = 0}, Do[s += permcount[p]*edges[p, 1+x^#&], {p, IntegerPartitions[n]}]; s/n!] // Expand // CoefficientList[#, x]&;
T[n_, k_] := If[k <= Length[row[n]], row[n][[k]], 0];
a[n_] := Sum[T[k, n-k+1], {k, 1, n}];
Table[Print[n, " ", a[n]]; a[n], {n, 1, 37}] (* Jean-François Alcover, Jan 09 2021, after Andrew Howroyd in A008406 *)
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, t) = {prod(i=2, #v, prod(j=1, i-1, my(g=gcd(v[i], v[j])); t(v[i]*v[j]/g)^g )) * prod(i=1, #v, my(c=v[i]); t(c)^((c-1)\2)*if(c%2, 1, t(c/2)))}
G(n, x)={my(s=0); forpart(p=n, s+=permcount(p)*edges(p, i->1+x^i)); s/n!}
seq(n)={Vec(sum(k=1, n, x^k*G(k, x + O(x*x^(n-k)))))} \\ Andrew Howroyd, Nov 07 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Petr Vojtechovsky (petr(AT)math.du.edu), Jul 05 2006
EXTENSIONS
Terms a(14) and beyond from Andrew Howroyd, Nov 07 2019
STATUS
approved