A340025
Number of connected graphs with vertices labeled with positive integers summing to n.
Original entry on oeis.org
1, 1, 2, 4, 12, 41, 210, 1478, 17128, 352926, 14181309, 1129005180, 175491164826, 52346463432414, 29666505555854777, 31806668884174645842, 64442744342933382243031, 246898165053174167804654086, 1791518193851453375966274280997, 24668222649527263942329934357240780
Offset: 0
-
\\ See A340022 for permcount, edges.
InvEulerT(v)={my(p=log(1+x*Ser(v))); dirdiv(vector(#v,n,polcoef(p,n)), vector(#v,n,1/n))}
seq(n) = {concat([1], InvEulerT(Vec(sum(k=1, n, my(s=0); forpart(p=k, s+=permcount(p) * 2^edges(p) * x^k/prod(j=1, #p, 1 - x^p[j] + O(x^(n-k+1)))); s/k!))))}
A337716
Number of graphs, where vertices are labeled with positive integers summing to n, and where identically labeled vertices are indistinguishable and cannot be connected with an edge.
Original entry on oeis.org
1, 1, 2, 4, 8, 16, 35, 77, 179, 440, 1160, 3264, 9950, 33206, 121943, 494011, 2235399, 11391306, 65287199, 422908306, 3130775625, 26490210964, 255257056748, 2825013955541, 36147331371446, 531237157370531, 8965348473026888
Offset: 0
-
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}
cross(u, v) = {sum(i=1, #u, sum(j=1, #v, gcd(u[i], v[j])))}
R(n,m,u)={if(n==0, 1, sum(k=if(m==1, n, 0), n\m, my(s=0); forpart(p=k, s+=self()(n-m*k, m-1, concat(u,Vec(p)))*2^cross(p,u)*permcount(p)); s/k!))}
a(n)={R(n,n,[])} \\ Andrew Howroyd, Sep 18 2020
Showing 1-2 of 2 results.