A339063
Number of unlabeled simple graphs with n edges rooted at two noninterchangeable vertices.
Original entry on oeis.org
1, 4, 13, 43, 141, 467, 1588, 5544, 19966, 74344, 286395, 1141611, 4707358, 20063872, 88312177, 400980431, 1875954361, 9032585846, 44709095467, 227245218669, 1184822316447, 6330552351751, 34630331194626, 193785391735685, 1108363501628097, 6474568765976164
Offset: 0
The a(1) = 4 cases correspond to a single edge which can be attached to zero, one or both of the roots.
-
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[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]}];
G[n_, x_, r_] := Module[{s = 0}, Do[s += permcount[p]*edges[Join[r, p], 1+x^#&], {p, IntegerPartitions[n]}]; s/n!];
seq[n_] := Module[{A = O[x]^n}, G[2n, x+A, {1, 1}]//CoefficientList[#, x]&];
seq[15] (* Jean-François Alcover, Dec 03 2020, after Andrew Howroyd *)
-
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)))}
G(n, x, r)={my(s=0); forpart(p=n, s+=permcount(p)*edges(concat(r, Vec(p)), i->1+x^i)); s/n!}
seq(n)={my(A=O(x*x^n)); Vec((G(2*n, x+A, [1, 1])))}
A304074
Number of simple connected graphs with n nodes rooted at a pair of distinguished vertices.
Original entry on oeis.org
0, 1, 4, 23, 162, 1549, 21090, 446061, 15673518, 961338288, 105752617892, 21155707801451, 7757777336382702, 5245054939576054088, 6571185585793205495484, 15325133281701584879975433, 66813349775478836190531605234, 546646811841381587823502759339055
Offset: 1
a(3)=4: one choice to mark two roots in the triangular graph; one choice to mark the two leaves in the linear graph; two choices to mark the center node and a leave (1st root in the center or 2nd root in the center) in the linear graph.
-
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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2)}
cross(u, v) = {sum(i=1, #u, sum(j=1, #v, gcd(u[i], v[j])))}
S(n, r)={my(t=#r+1); vector(n+1, n, if(nAndrew Howroyd, Sep 07 2019
A304069
Number of simple graphs on n vertices rooted at one oriented edge.
Original entry on oeis.org
0, 1, 4, 20, 120, 996, 12208, 241520, 8171936, 491317640, 53489987584, 10642774095040, 3891541970165760, 2627082058057474240, 3288629181834544457216, 7666328470407977450185984, 33415367571344085375628748800, 273361007807597539567353971109952
Offset: 1
a(3)=4: no contribution from the graph with 3 isolated nodes. 1 case of the connected graph with 2 nodes and an isolated node. 2 cases of the linear graph with 3 nodes (orientation either towards or away from the middle node). 1 case of the triangular graph.
-
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_] := Sum[GCD[v[[i]], v[[j]] ], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[Quotient[#, 2]& /@ v];
a[n_] := If[n < 2, 0, s = 0; Do[s += permcount[p]*(2^(2*Length[p] + edges[p])), {p, IntegerPartitions[n - 2]}]; s/(n - 2)!];
Array[a, 18] (* Jean-François Alcover, Jul 03 2018, after Andrew Howroyd *)
-
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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i],v[j]))) + sum(i=1, #v, v[i]\2)}
a(n)= {if(n<2, 0, my(s=0); forpart(p=n-2, s+=permcount(p)*(2^(2*#p+edges(p)))); s/(n-2)!)} \\ Andrew Howroyd, May 06 2018
A340028
Number of unlabeled 2-connected graphs with n vertices rooted at a pair of noninterchangeable vertices.
Original entry on oeis.org
0, 1, 1, 7, 55, 655, 11147, 287791, 11787747, 804475261, 94875366649, 19825870580671, 7466490852631207, 5129453728126116131, 6487332587944013948099, 15213161506747424007012971, 66536415576917924594383104139, 545371527333985035460963541248785
Offset: 1
-
\\ See A004115 for graphsSeries and A339645 for combinatorial species functions.
cycleIndexSeries(n)={my(g=graphsSeries(n), gcr=sPoint(g)/g); x*sPoint(sSolve( sLog( gcr/(x*sv(1)) ), gcr ))}
{ my(N=15); Vec(OgfSeries(cycleIndexSeries(N)), -N) }
Showing 1-4 of 4 results.
Comments