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.

A033878 Triangular array associated with Schroeder numbers.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 5, 10, 6, 1, 7, 22, 38, 22, 1, 9, 38, 98, 158, 90, 1, 11, 58, 194, 450, 698, 394, 1, 13, 82, 334, 978, 2126, 3218, 1806, 1, 15, 110, 526, 1838, 4942, 10286, 15310, 8558, 1, 17, 142, 778, 3142, 9922, 25150, 50746, 74614, 41586
Offset: 0

Views

Author

Keywords

Comments

Transpose of triangular array A132372. - Michel Marcus, May 02 2015

Examples

			This triangle reads:
1
1  1
1  3   2
1  5   10   6
1  7   22   38   22
1  9   38   98   158   90
1  11  58   194  450   698   394
1  13  82   334  978   2126  3218   1806
1  15  110  526  1838  4942  10286  15310   558
1  17  142  778  3142  9922  25150  50746  74614  41586
		

Crossrefs

Programs

  • PARI
    lgs(n) = if( n<1, 1, sum( k=0, n, 2^k * binomial( n, k) * binomial( n, k-1)) / n) /* A006318 */
    T(n, k) = if (k>n, 0, if (k==0, 1, if (n==0, 1, if ((n==k), lgs(n-1), T(n,k-1) + T(n-1,k-1) + T(n-1,k)))));
    tabl(nn) = {for (n=0, nn, for (m=0, n, print1(T(n, m), ", ");); print(););} \\ Michel Marcus, May 02 2015
    
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if n <  0: return 0
        if k == 0: return 1
        if n == k: return sum(T(n-1, k) for k in range(n))
        return T(n, k-1) + T(n-1, k-1) + T(n-1, k)
    for n in range(10):
        print([T(n, k) for k in range(n+1)])  # Peter Luschny, Dec 26 2024

Extensions

Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 23 2003