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.

Previous Showing 21-30 of 67 results. Next

A005197 a(n) = Sum_t t*F(n,t), where F(n,t) (see A033185) is the number of rooted forests with n (unlabeled) nodes and exactly t rooted trees.

Original entry on oeis.org

1, 3, 7, 17, 39, 96, 232, 583, 1474, 3797, 9864, 25947, 68738, 183612, 493471, 1334143, 3624800, 9893860, 27113492, 74577187, 205806860, 569678759, 1581243203, 4400193551, 12273287277, 34307646762, 96093291818, 269654004899, 758014312091, 2134300171031
Offset: 1

Views

Author

N. J. A. Sloane. Definition clarified by N. J. A. Sloane, May 29 2012

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory):
    t:= proc(n) option remember; local d, j; `if`(n<=1, n,
          (add(add(d*t(d), d=divisors(j))*t(n-j), j=1..n-1))/(n-1))
        end:
    b:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(b(n-i*j, i-1, p-j) *
           binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
        end:
    a:= a-> add(k*b(n, n, k), k=1..n):
    seq(a(n), n=1..40);  # Alois P. Heinz, Aug 20 2012
  • Mathematica
    t[1] = 1; t[n_] := t[n] = Module[{d, j}, Sum[Sum[d*t[d], {d, Divisors[j]}]*t[n-j], {j, 1, n-1}]/(n-1)]; b[1, 1, 1] = 1; b[n_, i_, p_] := b[n, i, p] = If[p>n, 0, If[n == 0, 1, If[Min[i, p]<1, 0, Sum[b[n-i*j, i-1, p-j]*Binomial[t[i]+j-1, j], {j, 0, Min[n/i, p]}]]]]; a[n_] := Sum[k*b[n, n, k], {k, 1, n}]; Table[a[n] // FullSimplify, {n, 1, 30}] (* Jean-François Alcover, Mar 13 2014, after Alois P. Heinz *)

Formula

To get a(n), take row n of the triangle in A033185, multiply successive terms by 1, 2, 3, ... and sum. E.g. a(4) = 1*4+2*3+3*1+4*1 = 17.
a(n) ~ c * d^n / n^(3/2), where d = A051491 = 2.955765285..., c = 2.85007275... . - Vaclav Kotesovec, Sep 10 2014

Extensions

More terms from Alois P. Heinz, Aug 20 2012

A116950 Number of functional patterns on n elements; or digraphs with maximum outdegree 1, n arrows and every point connected to an arrow.

Original entry on oeis.org

1, 2, 7, 20, 61, 174, 514, 1478, 4303, 12437, 36084, 104494, 303167, 879283, 2552803, 7413583, 21544347, 62635823, 182199853, 530228946, 1543761513, 4496523995, 13102414665, 38193626823, 111375529695, 324891970936, 948051861938, 2767336312386, 8080206646244
Offset: 0

Views

Author

Keywords

Comments

A001372 counts functional patterns from a set with n elements to itself; A000041 (partition function) counts functional patterns from a set with n elements to a disjoint set; this is the general case where the range may overlap the domain but may also include other values.

Examples

			For n=2 there are the following 7 digraphs:
o-+.o-+ o->o-+ o->o o-+.o->o o->o->o o->o o->o
^.|.^.| ...^.| ^..| ^.|..... ....... ...^ ....
+-+.+-+ ...+-+ +--+ +-+..... ....... o--+ o->o
		

Crossrefs

Programs

  • Mathematica
    nmax = 750;
    A002861 = Cases[Import["https://oeis.org/A002861/b002861.txt", "Table"], {, }][[;; nmax + 2, 2]];
    A000081 = Cases[Import["https://oeis.org/A000081/b000081.txt", "Table"], {, }][[;; nmax + 2, 2]];
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b];
    b[n_] := A002861[[n]] + A000081[[n + 2]];
    a = etr[b];
    a[0] = 1;
    a /@ Range[0, nmax](* Jean-François Alcover, Mar 13 2020 *)

Formula

Euler transform of A002861(n) + A000081(n+1).
a(n) ~ c * d^n / sqrt(n), where d = A051491 = 2.95576528565199497471481752412..., c = 3.435908969217935496995961718... . - Vaclav Kotesovec, Sep 10 2014

A209397 L.g.f.: Sum_{n>=1} a(n)*x^n/n = Sum_{n>=1} x^n/n * exp( Sum_{k>=1} a(k)*x^(n*k)/k ).

Original entry on oeis.org

1, 3, 7, 19, 46, 129, 337, 939, 2581, 7238, 20263, 57337, 162319, 461961, 1317217, 3767035, 10792400, 30983565, 89084845, 256531814, 739658815, 2135234247, 6170505666, 17849457873, 51679366171, 149750711581, 434260829464, 1260198317509, 3659410074933
Offset: 1

Views

Author

Paul D. Hanna, Mar 07 2012

Keywords

Examples

			L.g.f.: L(x) = x + 3*x^2/2 + 7*x^3/3 + 19*x^4/4 + 46*x^5/5 + 129*x^6/6 +...
Let G(x) be the g.f. of A000081, then
exp(L(x)) = G(x)/x where G(x) = x*exp( Sum_{n>=1} G(x^n)/n ) begins:
G(x) = x + x^2 + 2*x^3 + 4*x^4 + 9*x^5 + 20*x^6 + 48*x^7 + 115*x^8 + 286*x^9 + 719*x^10 + 1842*x^11 + 4766*x^12 + 12486*x^13 + 32973*x^14 +...
		

Crossrefs

Programs

  • PARI
    {a(n)=local(L=vector(n, i, 1)); for(i=1, n, L=Vec(deriv(sum(m=1, n, x^m/m*exp(sum(k=1, n\m, L[k]*x^(m*k)/k)+x*O(x^n)))))); L[n]}
    for(n=1,30,print1(a(n),","))

Formula

a(n) = Sum_{d|n} d*A000081(d).
L.g.f.: Sum_{n>=1} -A000081(n) * log(1-x^n).
L.g.f.: log( G(x)/x ) = Sum_{n>=1} G(x^n)/n where G(x) is the g.f. of A000081, which is the number of rooted trees with n nodes.
a(n) ~ c * d^n / sqrt(n), where d = A051491 = 2.9557652856519949747148..., c = A187770 = 0.4399240125710253040409... . - Vaclav Kotesovec, Oct 30 2014

A215978 Number of simple unlabeled graphs on n nodes with connected components that are trees or cycles.

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 28, 52, 104, 206, 429, 903, 1982, 4430, 10206, 23966, 57522, 140236, 347302, 870682, 2207819, 5651437, 14590703, 37948338, 99358533, 261684141, 692906575, 1843601797, 4926919859, 13220064562, 35604359531, 96218568474, 260850911485
Offset: 0

Views

Author

Alois P. Heinz, Aug 29 2012

Keywords

Examples

			a(4) = 8:
.o-o.  .o-o.  .o-o.  .o-o.  .o-o.  .o-o.  .o-o.  .o o.
.| |.  .|  .  .|\ .  .|/ .  .|  .  .   .  .   .  .   .
.o-o.  .o-o.  .o o.  .o o.  .o o.  .o-o.  .o o.  .o o.
		

Crossrefs

Row sum of A215977.
The labeled version is A144164. The inverse Euler transform is A215981.

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; local d, j; `if`(n<=1, n,
          (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
        end:
    g:= proc(n) option remember; local k; `if`(n>2, 1, 0)+ b(n)-
          (add(b(k)*b(n-k), k=0..n) -`if`(irem(n, 2)=0, b(n/2), 0))/2
        end:
    p:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(g(i)+j-1,j)*p(n-i*j, i-1), j=0..n/i)))
        end:
    a:= n-> p(n, n):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, (Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}])/(n - 1)];
    g[n_] := g[n] = If[n > 2, 1, 0] + b[n] - (Sum[b[k]*b[n - k], {k, 0, n}] - If[Mod[n, 2] == 0, b[n/2], 0])/2;
    p[n_, i_] := p[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[g[i] + j - 1, j]*p[n - i*j, i - 1], {j, 0, n/i}]]];
    a[n_] := p[n, n];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 21 2017, translated from Maple *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial, divisors
    @cacheit
    def b(n): return n if n<2 else sum([sum([d*b(d) for d in divisors(j)])*b(n - j) for j in range(1, n)])//(n - 1)
    @cacheit
    def g(n): return (1 if n>2 else 0) + b(n) - (sum([b(k)*b(n - k) for k in range(n + 1)]) - (b(n//2) if n%2==0 else 0))//2
    @cacheit
    def p(n, i): return 1 if n==0 else 0 if i<1 else sum([binomial(g(i) + j - 1, j)*p(n - i*j, i - 1) for j in range(n//i + 1)])
    def a(n): return p(n, n)
    print([a(n) for n in range(41)]) # Indranil Ghosh, Aug 07 2017

Formula

a(n) = Sum_{k=0..n} A215977(n,k).
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.95576528565199497471481752412... is Otter's rooted tree constant, and c = 1.085767435235426664262830616636... . - Vaclav Kotesovec, Mar 22 2017

A255170 a(n) = A087803(n) - n + 1.

Original entry on oeis.org

1, 1, 2, 5, 13, 32, 79, 193, 478, 1196, 3037, 7802, 20287, 53259, 141069, 376449, 1011295, 2732453, 7421128, 20247355, 55469186, 152524366, 420807220, 1164532203, 3231706847, 8991343356, 25075077684, 70082143952, 196268698259, 550695545855, 1547867058852
Offset: 1

Views

Author

Vladimir Reshetnikov, Feb 15 2015

Keywords

Comments

Conjectured extension of A199812: number of distinct values taken by w^w^...^w (with n w's and parentheses inserted in all possible ways) where w is the first transfinite ordinal omega. So far all known terms of A199812 (that is, 20 of them) coincide with this sequence. It is conjectured that A199812 is actually identical to this sequence, but it remains unproved, and is computationally difficult to check for n > 20.

Examples

			a(4) = 1 - 4 + Sum_{k=1..4} A000081(k) = 1 - 4 + 1 + 1 + 2 + 4 = 5.
a(5) = 1 - 5 + Sum_{k=1..5} A000081(k) = 1 - 5 + 1 + 1 + 2 + 4 + 9 = 13.
		

Crossrefs

Cf. A199812 (conjectured to be identical), A087803, A000081, A174145 (2nd differences), A005348, A002845, A198683, A187770, A051491.

Programs

  • Maple
    with(numtheory):
    t:= proc(n) option remember; `if`(n<2, n, (add(add(
          d*t(d), d=divisors(j))*t(n-j), j=1..n-1))/(n-1))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
          add(b(n-i*j, i-1)*binomial(t(i)+j-1, j), j=0..n/i)))
        end:
    a:= proc(n) option remember; `if`(n<3, 1,
          b(n-1$2) +2*a(n-1) -a(n-2))
        end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Feb 17 2015
  • Mathematica
    t[1] = a[1] = 1; t[n_] := t[n] = Sum[k t[k] t[n - k m]/(n-1), {k, n}, {m, (n-1)/k}]; a[n_] := a[n] = a[n-1] + t[n] - 1; Table[a[n], {n, 40}] (* Vladimir Reshetnikov, Aug 12 2016 *)

Formula

a(n) = 1 - n + Sum_{k=1..n} A000081(k).
Recurrence: a(1) = 1, a(n+1) = a(n) + A000081(n+1) - 1.
Recurrence: a(1) = a(2) = 1, a(n) = A174145(n-1) + 2*a(n-1) - a(n-2).
Asymptotics: a(n) ~ c * d^n / n^(3/2), where c = A187770 / (1 - 1 / A051491) = 0.664861... and d = A051491 = 2.955765...

Extensions

Simpler definition and program in terms of A000081. - Vladimir Reshetnikov, Aug 12 2016
Renamed. - Vladimir Reshetnikov, Aug 23 2016

A339986 Decimal expansion of a constant related to the asymptotics of A339984.

Original entry on oeis.org

0, 5, 7, 8, 4, 4, 6, 7, 8, 7, 8, 4, 8, 5, 6, 0, 5, 8, 9, 2, 2, 6, 7, 2, 8, 5, 7, 4, 8, 4, 0, 9, 3, 3, 9, 2, 5, 0, 3, 1, 1, 0, 3, 9, 2, 0, 2, 3, 0, 2, 0, 3, 8, 5, 8, 8, 7, 6, 9, 3, 6, 8, 5, 9, 5, 0, 9, 2, 2, 9, 4, 3, 7, 0, 8, 3, 1, 7, 3, 8, 1, 7, 0, 2, 2, 6, 3, 0, 4, 2, 8, 8, 0, 7, 7, 5, 0, 1, 1, 2, 1, 2, 0, 6, 8, 2
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 25 2020

Keywords

Examples

			0.057844678784856058922672857484093392503110392...
		

Crossrefs

Formula

Equals lim_{n->infinity} A339984(n) * n^(3/2) / A051491^n.

A174145 Number of rooted forests with n nodes in which each component contains at least two nodes.

Original entry on oeis.org

1, 0, 1, 2, 5, 11, 28, 67, 171, 433, 1123, 2924, 7720, 20487, 54838, 147570, 399466, 1086312, 2967517, 8137552, 22395604, 61833349, 171227674, 475442129, 1323449661, 3692461865, 10324097819, 28923331940, 81179488039, 228240293289, 642744665401, 1812762839702
Offset: 0

Views

Author

N. J. A. Sloane, Nov 26 2010

Keywords

Comments

Row sums of A174135.

Crossrefs

Programs

  • Maple
    with(numtheory):
    t:= proc(n) option remember; local d, j; `if`(n<=1, n,
          (add(add(d*t(d), d=divisors(j))*t(n-j), j=1..n-1))/(n-1))
        end:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
          add(b(n-i*j, i-1)*binomial(t(i)+j-1, j), j=0..n/i)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..32);  # Alois P. Heinz, May 17 2013
  • Mathematica
    t[n_] := t[n] = If[n <= 1, n, Sum[Sum[d*t[d], {d, Divisors[j]}]*t[n-j], {j, 1, n-1}]/(n-1)]; b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<2, 0, Sum[b[n-i*j, i-1]*Binomial[t[i]+j-1, j], {j, 0, n/i}]]]; a[n_] := b[n, n]; Table[a[n] // FullSimplify, {n, 0, 32}] (* Jean-François Alcover, Mar 19 2014, after Alois P. Heinz *)
    t[1] = 1; t[n_] := t[n] = Sum[k t[k] t[n - k m]/(n-1), {k, n-1}, {m, (n-1)/k}]; a[n_] := t[n+1] - t[n]; Table[a[n], {n, 0, 32}] (* Vladimir Reshetnikov, Aug 12 2016 *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = A051491 = 2.9557652856519949747148..., c = 0.8603881121111431... . - Vaclav Kotesovec, Sep 10 2014
In the asymptotics above the constant c = A187770 * (A051491 - 1). - Vladimir Reshetnikov, Aug 12 2016
a(n) = A000081(n+1) - A000081(n). - Vladimir Reshetnikov, Nov 06 2015

A215930 Number of forests on unlabeled nodes with n edges and no single node trees.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 34, 71, 154, 341, 768, 1765, 4134, 9838, 23766, 58226, 144353, 361899, 916152, 2339912, 6023447, 15617254, 40752401, 106967331, 282267774, 748500921, 1993727506, 5332497586, 14316894271, 38574473086, 104273776038, 282733466684, 768809041078
Offset: 0

Views

Author

Alois P. Heinz, Aug 27 2012

Keywords

Comments

Each forest counted by a(n) with n>0 has number of nodes from the interval [n+1,2*n] and number of trees in [1,n].
Also limiting sequence of reversed rows of A095133.
Differs from A011782 first at n=6 (32) and from A088325 at n=8 (153).

Examples

			a(0) = 1: (  ), the empty forest with 0 trees and 0 edges.
a(1) = 1: ( o-o ), 1 tree and 1 edge.                      o
a(2) = 2: ( o-o-o ), ( o-o o-o ).                          |
a(3) = 4: ( o-o-o-o ), ( o-o-o o-o ), ( o-o o-o o-o ), ( o-o-o ).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; local d, j; `if`(n<=1, n,
          (add(add(d*b(d), d=divisors(j)) *b(n-j), j=1..n-1))/(n-1))
        end:
    t:= proc(n) option remember; local k; `if` (n=0, 1, b(n)-
          (add(b(k)*b(n-k), k=0..n)-`if`(irem(n, 2)=0, b(n/2), 0))/2)
        end:
    g:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(g(n-i*j, i-1, p-j)*
           binomial(t(i)+j-1, j), j=0..min(n/i, p)))))
        end:
    a:= n-> g(2*n, 2*n, n):
    seq(a(n), n=0..40);
  • Mathematica
    nn = 30; t[x_] := Sum[a[n] x^n, {n, 1, nn}]; a[0] = 0;
    a[1] = 1; sol =
    SolveAlways[
      0 == Series[
        t[x] - x Product[1/(1 - x^i)^a[i], {i, 1, nn}], {x, 0, nn}], x];
    b[x_] := Sum[a[n] x^n /. sol, {n, 0, nn}]; ft =
    Drop[Flatten[
       CoefficientList[Series[b[x] - (b[x]^2 - b[x^2])/2, {x, 0, nn}],
        x]], 1]; Drop[
    CoefficientList[
      Series[Product[1/(1 - y ^(i - 1))^ft[[i]], {i, 2, nn}], {y, 0, nn}],
    y], -1] (* Geoffrey Critzer, Nov 10 2014 *)

Formula

a(n) = A095133(2*n,n).
a(n) = A105821(2*n+1,n+1). - Alois P. Heinz, Jul 10 2013
a(n) = A136605(2*n+1,n). - Alois P. Heinz, Apr 11 2014
a(n) ~ c * d^n / n^(5/2), where d = A051491 = 2.955765285..., c = 3.36695186... . - Vaclav Kotesovec, Sep 10 2014

A244407 Number of unlabeled rooted trees with 2n nodes and maximal outdegree (branching factor) n.

Original entry on oeis.org

1, 2, 6, 17, 50, 143, 416, 1199, 3474, 10049, 29119, 84377, 244748, 710199, 2062274, 5991418, 17416401, 50652248, 147384676, 429043390, 1249508947, 3640449679, 10610613552, 30937605076, 90237313083, 263288153074, 768449666117, 2243530461067, 6552016136667
Offset: 1

Views

Author

Joerg Arndt and Alois P. Heinz, Jun 27 2014

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(binomial(b((i-1)$2, k$2)+j-1, j)*
           b(n-i*j, i-1, t-j, k), j=0..min(t, n/i))))
        end:
    a:= n-> b(2*n-1$2, n$2)-b(2*n-1$2, n-1$2):
    seq(a(n), n=1..30);
  • Mathematica
    b[n_, i_, t_, k_] := b[n, i, t, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[b[i - 1, i - 1, k, k] + j - 1, j]* b[n - i*j, i - 1, t - j, k], {j, 0, Min[t, n/i]}]] // FullSimplify] ; a[n_] := b[2*n - 1, 2 n - 1, n, n] - b[2*n - 1, 2 n - 1, n - 1, n - 1]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Feb 06 2015, after Maple *)

Formula

a(n) = A244372(2n,n).
a(n) ~ c * d^n / sqrt(n), where d = 2.955765285651994974714817524... is the Otter's rooted tree constant (see A051491), and c = 0.9495793... . - Vaclav Kotesovec, Jul 11 2014

A255705 Number of 2n+1-node rooted trees in which the maximal number of nodes in paths starting at a leaf and ending at the first branching node or at the root equals n+1.

Original entry on oeis.org

1, 1, 3, 8, 22, 60, 167, 465, 1306, 3681, 10422, 29597, 84313, 240757, 689035, 1975753, 5675145, 16326198, 47032200, 135658367, 391733593, 1132357784, 3276330780, 9487885056, 27497891241, 79753806451, 231474005120, 672250119756, 1953523496677, 5680002466125
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2015

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    g:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*(g(d-1, k)-
          `if`(d=k, 1, 0)), d=divisors(j))*g(n-j, k), j=1..n)/n)
        end:
    a:= a-> g(2*n, n+1) -`if`(n=0, 0, g(2*n, n)):
    seq(a(n), n=0..40);
  • Mathematica
    g[n_, k_] := g[n, k] = If[n == 0, 1, Sum[DivisorSum[j, #*(g[# - 1, k] - If[# == k, 1, 0]) &]*g[n - j, k], {j, 1, n}]/n];
    a[n_] :=  g[2n, n+1] - If[n == 0, 0, g[2n, n]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 24 2017, translated from Maple *)

Formula

a(n) = A255704(2*n+1,n+1).
a(n) ~ c * d^n / sqrt(n), where d = A051491 = 2.955765285651994974714817524... and c = 0.70755335886284109851526791506579... . - Vaclav Kotesovec, Feb 28 2016
a(n) = A318754(2n+2,n+1) = A318758(2n+2,n+1). - Alois P. Heinz, Sep 02 2018
Previous Showing 21-30 of 67 results. Next