%I #10 Feb 26 2023 13:42:00
%S 1,4,17,69,281,1147,4784,20345,88726,396971,1823920,8605364,41684417,
%T 207201343,1056244832,5518054182,29521703655,161625956908,
%U 904857279576,5176569819167,30241443710950,180293374961036,1096240011165724,6793998104717138,42894087222036022,275735424352928682
%N Number of unlabeled loopless multigraphs with n edges rooted at two noninterchangeable vertices.
%e The a(1) = 4 cases correspond to a single edge which can be attached to zero, one or both of the roots.
%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[With[{g = GCD[v[[i]], v[[j]]]}, t[v[[i]]*v[[j]]/ g]^g], {i, 2, Length[v]}, {j, 1, i - 1}]*Product[With[{c = v[[i]]}, t[c]^Quotient[c-1, 2]*If[OddQ[c], 1, t[c/2]]], {i, 1, Length[v]}];
%t G[n_, x_, r_] := Module[{s = 0}, Do[s += permcount[p]*edges[Join[r, p], 1/(1 - x^#) &], {p, IntegerPartitions[n]}]; s/n!];
%t seq[n_] := Module[{A = O[x]^n}, G[2n, x+A, {1, 1}]//CoefficientList[#, x]&];
%t seq[15] (* _Jean-François Alcover_, Dec 01 2020, 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 G(n, x, r)={my(s=0); forpart(p=n, s+=permcount(p)*edges(concat(r, Vec(p)), i->1/(1-x^i))); s/n!}
%o seq(n)={my(A=O(x*x^n)); Vec((G(2*n, x+A, [1, 1])))}
%Y Cf. A050535, A007717 (one root), A339042, A339063, A339066.
%K nonn
%O 0,2
%A _Andrew Howroyd_, Nov 22 2020
|