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-4 of 4 results.

A255636 Number A(n,k) of n-node rooted trees with a forbidden limb of length k; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 0, 1, 1, 2, 3, 4, 0, 1, 1, 2, 4, 7, 8, 0, 1, 1, 2, 4, 8, 15, 17, 0, 1, 1, 2, 4, 9, 18, 35, 36, 0, 1, 1, 2, 4, 9, 19, 43, 81, 79, 0, 1, 1, 2, 4, 9, 20, 46, 102, 195, 175, 0, 1, 1, 2, 4, 9, 20, 47, 110, 251, 473, 395, 0
Offset: 1

Views

Author

Alois P. Heinz, Feb 28 2015

Keywords

Comments

Any rootward k-node path starting at a leaf contains the root or a branching node.

Examples

			:    o      o        o      o    o       o      o    o
:  /(|)\    |       / \    /|\   |       |     / \   |
: o ooo 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   o    o
: A(6,2) = 8                                        / \
:                                                  o   o
Square array A(n,k) begins:
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  0,   1,   1,   1,   1,   1,   1,   1,   1,   1, ...
  0,   1,   2,   2,   2,   2,   2,   2,   2,   2, ...
  0,   2,   3,   4,   4,   4,   4,   4,   4,   4, ...
  0,   4,   7,   8,   9,   9,   9,   9,   9,   9, ...
  0,   8,  15,  18,  19,  20,  20,  20,  20,  20, ...
  0,  17,  35,  43,  46,  47,  48,  48,  48,  48, ...
  0,  36,  81, 102, 110, 113, 114, 115, 115, 115, ...
  0,  79, 195, 251, 273, 281, 284, 285, 286, 286, ...
  0, 175, 473, 625, 684, 706, 714, 717, 718, 719, ...
		

Crossrefs

Main diagonal gives A000081.
Cf. A255704.

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:= (n, k)-> g(n-1, k):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..14);
  • Mathematica
    g[n_, k_] := g[n, k] = If[n == 0, 1, Sum[Sum[d*(g[d - 1, k] - If[d == k, 1, 0]), {d, Divisors[j]}]*g[n - j, k], {j, 1, n}]/n]; A[n_, k_] := g[n - 1, k]; Table[Table[A[n, 1 + d - n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

A002989 Number of n-node trees with a forbidden limb of length 3.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 4, 7, 14, 28, 61, 131, 297, 678, 1592, 3770, 9096, 22121, 54451, 135021, 337651, 849698, 2152048, 5479408, 14022947, 36048514, 93061268, 241160180, 627179689, 1636448181, 4282964600, 11241488853, 29584389474
Offset: 0

Views

Author

Keywords

Comments

A tree with a forbidden limb of length k is a tree where the path from any leaf inward hits a branching node or another leaf within k steps.

References

  • A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory):
    g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
          `if`(d=3, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
        end:
    a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
             g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 06 2014
  • Mathematica
    g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 3, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2] - 1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)

Formula

G.f.: 1 + B(x) + (B(x^2) - B(x)^2)/2 where B(x) is g.f. of A052321.
a(n) ~ c * d^n / n^(5/2), where d = 2.851157026715821487965080545784..., c = 0.463162985533004672966744142107... . - Vaclav Kotesovec, Aug 24 2014

Extensions

More terms, formula and comments from Christian G. Bower, Dec 15 1999

A002990 Number of n-node trees with a forbidden limb of length 4.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 5, 9, 19, 38, 86, 188, 439, 1026, 2472, 5997, 14835, 36964, 93246, 236922, 607111, 1565478, 4062797, 10599853, 27797420, 73224806, 193709710, 514406793, 1370937140, 3665714528, 9831891555, 26445886506, 71325268179
Offset: 0

Views

Author

Keywords

Comments

A tree with a forbidden limb of length k is a tree where the path from any leaf inward hits a branching node or another leaf within k steps.

References

  • A. J. Schwenk, Almost all trees are cospectral, pp. 275-307 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory):
    g:= proc(n) g(n):= `if`(n=0, 1, add(add(d*(g(d-1)-
          `if`(d=4, 1, 0)), d=divisors(j))*g(n-j), j=1..n)/n)
        end:
    a:= n-> `if`(n=0, 1, g(n-1)+(`if`(irem(n, 2, 'r')=0,
             g(r-1), 0)-add(g(i-1)*g(n-i-1), i=1..n-1))/2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 06 2014
  • Mathematica
    g[n_] := g[n] = If[n == 0, 1, Sum[Sum[d*(g[d-1]-If[d == 4, 1, 0]), {d, Divisors[j] }]*g[n-j], {j, 1, n}]/n]; a[n_] := If[n == 0, 1, g[n-1] + (If[Mod[n, 2 ] == 0, g[Quotient[n, 2]-1], 0] - Sum[g[i-1]*g[n-i-1], {i, 1, n-1}])/2]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)

Formula

G.f.: 1 + B(x) + (B(x^2) - B(x)^2)/2 where B(x) is g.f. of A052327.
a(n) ~ c * d^n / n^(5/2), where d = 2.9224691962496551739365155005926..., c = 0.503471518908815272581177797536... . - Vaclav Kotesovec, Aug 25 2014

Extensions

More terms, formula and comments from Christian G. Bower, Dec 15 1999

A003006 Number of n-level ladder expressions with A001622.

Original entry on oeis.org

1, 1, 2, 3, 7, 15, 35, 81, 195, 473, 1170, 2920, 7378, 18787, 48242, 124658, 324095, 846872, 2223352, 5861011, 15508423, 41173560, 109648734
Offset: 1

Views

Author

Keywords

Comments

Number of distinct values taken by phi^phi^...^phi (with n phi's and parentheses inserted in all possible ways), where phi = A001622 = (1 + sqrt(5))/2 is the golden ratio. - Vladimir Reshetnikov, Mar 05 2019

References

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

Crossrefs

Cf. A001622, A002845, A082499, A052321 (first 10 terms match), A198683, A199812.

Programs

  • Mathematica
    ClearAll[phi, t, a]; t[1] = {0}; t[n_Integer] := t[n] = DeleteDuplicates[Flatten[Table[Outer[phi^#1 + #2 &, t[k], t[n - k]], {k, n - 1}]] /. phi^k_Integer :> Fibonacci[k] phi + Fibonacci[k - 1]]; a[n_Integer] := a[n] = Length[t[n]]; Table[a[n], {n, 23}]

Extensions

a(10)-a(23) added by Vladimir Reshetnikov, Mar 05 2019
Showing 1-4 of 4 results.