cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A138387 Numbers of unlabeled graphs with n vertices and 2 unicyclic components.

Original entry on oeis.org

1, 2, 8, 23, 74, 220, 674, 2011, 6038, 17980, 53547, 158907, 471225, 1394786, 4124929, 12185636, 35972082, 106111713, 312835608, 921809509, 2715058701, 7993741597, 23527694230, 69228383367, 203648980297, 598945442071
Offset: 6

Views

Author

Washington Bomfim, Mar 18 2008

Keywords

Comments

This sequence is the second row of table T of A137918.

Examples

			a(13) = 2,011, since n is odd and the partitions are 3+10, 4+9, 5+8 and 6+7. This gives 657 + 480 + 445 + 429 graphs.
Note that f(4)= 2, f(5) = 5, f(6) = 13, f(7) = 33, f(8) = 89, f(9) = 240 and f(10) = 657.
		

Crossrefs

Programs

  • Mathematica
    nmax = 31;
    TreeGf[nn_] := Module[{A}, A = Table[1, {nn}]; For[n = 1, n <= nn - 1, n++, A[[n + 1]] = 1/n * Sum[Sum[ d*A[[d]], {d, Divisors[k]}]*A[[n - k + 1]], {k, 1, n}]]; x A.x^Range[0, nn - 1]];
    seq[n_] := Module[{t, g}, If[n < 3, {}, t = TreeGf[n - 2]; g[e_] := Normal[t + O[x]^(Quotient[n, e] + 1)] /. x -> x^e  + O[x]^(n + 1); Sum[Sum[EulerPhi[d]*g[d]^(k/d), {d, Divisors[k]}]/k + If[OddQ[k], g[1]*g[2]^Quotient[k, 2], (g[1]^2 + g[2])*g[2]^(k/2-1)/2], {k, 3, n}]]/2 // Drop[CoefficientList[#, x], 3]&];
    A001429 = seq[nmax];
    f[k_] := A001429[[k - 2]];
    a[n_] := If[OddQ[n], Sum[f[i] * f[n - i], {i, 3, (n - 1)/2}], Sum[f[i] * f[n - i], {i, 3, n/2 - 1 }] + (f[n/2] + 1)*f[n/2]/2];
    a /@ Range[6, nmax] (* Jean-François Alcover, Oct 05 2019, using Andrew Howroyd's code for A001429 *)

Formula

For n odd, a(n) = Sum(3 <= i <= (n-1)/2){f(i) * f(n-i)}; for n even, a(n) = Sum(3 <= i <= n/2 - 1){f(i) * f(n-i)} + (f(n/2)+1)*f(n/2)/2, where f(k) is A001429(k).