login
A328057
Number of graphs with n nodes having fewer than n edges.
1
1, 2, 3, 7, 14, 33, 81, 215, 601, 1808, 5721, 19133, 67218, 247377, 950679, 3806360, 15837196, 68336348, 305196782, 1408294018, 6703197359, 32861879994, 165699114887, 858237346563, 4560774579700, 24839216194151, 138505159164086, 789982051646096, 4604866422703625
OFFSET
1,2
LINKS
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[g = GCD[v[[i]], v[[j]]]; t[v[[i]]*v[[j]]/g]^g, {i, 2, Length[v]}, {j, 1, i - 1}]*Product[c = v[[i]]; t[c]^Quotient[c - 1, 2]*If[OddQ[c], 1, t[c/2]], {i, 1, Length[v]}];
a[n_] := a[n] = Module[{s = O[x]^n}, Do[s += permcount[p]*edges[p, 1 + x^# + O[x]^n &], {p, IntegerPartitions[n]}]; SeriesCoefficient[s/(1-x), {x, 0, n - 1}]/n!];
Table[Print[n, " ", a[n]]; a[n], {n, 1, 30}] (* Jean-François Alcover, Jan 08 2021, 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, 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)))}
a(n)={my(s=O(x^n)); forpart(p=n, s+=permcount(p)*edges(p, i->1 + x^i + O(x^n))); polcoef(s/(1-x), n-1)/n!} \\ Andrew Howroyd, Oct 22 2019
CROSSREFS
Sequence in context: A348530 A229734 A035083 * A305785 A367387 A185089
KEYWORD
nonn
AUTHOR
Sigurd Kittilsen and Lars Tveito, Oct 07 2019
EXTENSIONS
Terms a(17) and beyond from Andrew Howroyd, Oct 22 2019
STATUS
approved