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.

Showing 1-3 of 3 results.

A274937 Number of unlabeled forests on n nodes that have exactly two nonempty components.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 6, 11, 23, 46, 99, 216, 488, 1121, 2644, 6334, 15437, 38132, 95368, 241029, 614968, 1582030, 4100157, 10697038, 28075303, 74086468, 196470902, 523383136, 1400051585, 3759508536, 10131097618, 27391132238, 74283552343, 202030012554, 550934060120, 1506161266348
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Crossrefs

Cf. A000055, A274935, A274936, A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=1..n/2)-
          `if`(n::odd, 0, (t-> t*(t-1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/ (n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}] + If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 1, n/2}] - If[OddQ[n], 0, Function[t, t*(t-1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 14 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 + A(x^2)]/2 where A(x) is the o.g.f. for A000055 without the initial constant 1.
a(n) = A095133(n,2). - R. J. Mathar, Jul 20 2016

A274935 Number of n-node unlabeled forests with two connected components.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 12, 22, 46, 93, 205, 451, 1039, 2422, 5803, 14075, 34757, 86761, 219235, 558984, 1438033, 3726535, 9723913, 25525112, 67375200, 178723358, 476264352, 1274448596, 3423494617, 9229075121, 24961969420, 67721961268, 184255962564, 502658875034, 1374713691841, 3768527610094, 10353602341313
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Comments

One of the components may be empty (the null graph): a(n) = A000055(n) + A274937(n). - R. J. Mathar, Aug 15 2017

Crossrefs

Cf. A000055, A274936, A274937, A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t-1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/ (n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}]+If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 0, n/2}]-If[OddQ[n], 0, Function[t, t*(t-1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 15 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 + A(x^2)]/2 where A(x) is the o.g.f. for A000055.

A274936 Number of n-node unlabeled forests that have 2 non-isomorphic components.

Original entry on oeis.org

0, 1, 1, 2, 3, 6, 11, 22, 44, 93, 202, 451, 1033, 2422, 5792, 14075, 34734, 86761, 219188, 558984, 1437927, 3726535, 9723678, 25525112, 67374649, 178723358, 476263051, 1274448596, 3423491458, 9229075121, 24961961679, 67721961268, 184255943244, 502658875034, 1374713643212
Offset: 0

Views

Author

N. J. A. Sloane, Jul 19 2016

Keywords

Crossrefs

Cf. A000055, A274935-A274938. [A274935, A274936, A274937, A274938] are analogs for forests of [A275165, A275166, A216785, A274934] for graphs.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*
          b(d), d=divisors(j))*b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; `if`(n=0, 1, b(n)-add(b(j)*
          b(n-j), j=0..n/2)+`if`(n::odd, 0, (t->t*(t+1)/2)(b(n/2))))
        end:
    a:= proc(n) option remember; add(g(j)*g(n-j), j=0..n/2)-
          `if`(n::odd, 0, (t-> t*(t+1)/2)(g(n/2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 20 2016
  • Mathematica
    b[n_] := b[n] = If[n<2, n, Sum[DivisorSum[j, #*b[#]&]*b[n-j], {j, 1, n-1}]/(n-1)];
    g[n_] := g[n] = If[n==0, 1, b[n]-Sum[b[j]*b[n-j], {j, 0, n/2}]+If[OddQ[n], 0, Function[t, t*(t+1)/2][b[n/2]]]];
    a[n_] := a[n] = Sum[g[j]*g[n-j], {j, 0, n/2}]-If[OddQ[n], 0, Function[t, t*(t+1)/2][g[n/2]]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 15 2017, after Alois P. Heinz *)

Formula

G.f.: [A(x)^2 - A(x^2)]/2 where A(x) is the o.g.f. for A000055.
a(2n+1) = A274935(2n+1). a(2n) = A274935(2n)-A000055(n). - R. J. Mathar, Jul 20 2016
Showing 1-3 of 3 results.