login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339063 Number of unlabeled simple graphs with n edges rooted at two noninterchangeable vertices. 9

%I #10 Dec 03 2020 07:35:12

%S 1,4,13,43,141,467,1588,5544,19966,74344,286395,1141611,4707358,

%T 20063872,88312177,400980431,1875954361,9032585846,44709095467,

%U 227245218669,1184822316447,6330552351751,34630331194626,193785391735685,1108363501628097,6474568765976164

%N Number of unlabeled simple graphs 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, 2, Length[v]}];

%t G[n_, x_, r_] := Module[{s = 0}, Do[s += permcount[p]*edges[Join[r, p], 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 03 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+x^i)); s/n!}

%o seq(n)={my(A=O(x*x^n)); Vec((G(2*n, x+A, [1, 1])))}

%Y Cf. A000664, A053419 (one root), A304070, A339040, A339064, A339065.

%K nonn

%O 0,2

%A _Andrew Howroyd_, Nov 22 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 14:35 EDT 2024. Contains 371989 sequences. (Running on oeis4.)