login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of graphs with n nodes having fewer than n edges.
1

%I #22 Jan 09 2021 11:37:50

%S 1,2,3,7,14,33,81,215,601,1808,5721,19133,67218,247377,950679,3806360,

%T 15837196,68336348,305196782,1408294018,6703197359,32861879994,

%U 165699114887,858237346563,4560774579700,24839216194151,138505159164086,789982051646096,4604866422703625

%N Number of graphs with n nodes having fewer than n edges.

%H Andrew Howroyd, <a href="/A328057/b328057.txt">Table of n, a(n) for n = 1..50</a>

%t 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];

%t 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]}];

%t 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!];

%t Table[Print[n, " ", a[n]]; a[n], {n, 1, 30}] (* _Jean-François Alcover_, Jan 08 2021, after _Andrew Howroyd_ *)

%o (PARI)

%o 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}

%o 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)))}

%o 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

%Y Cf. A001433, A008406.

%K nonn

%O 1,2

%A _Sigurd Kittilsen_ and _Lars Tveito_, Oct 07 2019

%E Terms a(17) and beyond from _Andrew Howroyd_, Oct 22 2019