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.

A371300 Triangle read by rows: Riordan array (1/(1 - x), (1 + x)/(1 - x - x^2)).

Original entry on oeis.org

1, 1, 2, 1, 5, 4, 1, 10, 16, 8, 1, 18, 45, 44, 16, 1, 31, 107, 158, 112, 32, 1, 52, 232, 461, 488, 272, 64, 1, 86, 474, 1190, 1680, 1392, 640, 128, 1, 141, 930, 2831, 5009, 5512, 3760, 1472, 256, 1, 230, 1772, 6355, 13541, 18602, 16816, 9760, 3328, 512
Offset: 0

Views

Author

Peter Luschny, Mar 18 2024

Keywords

Examples

			Triangle begins:
  [0] 1;
  [1] 1,  2;
  [2] 1,  5,   4;
  [3] 1, 10,  16,    8;
  [4] 1, 18,  45,   44,   16;
  [5] 1, 31, 107,  158,  112,   32;
  [6] 1, 52, 232,  461,  488,  272,   64;
  [7] 1, 86, 474, 1190, 1680, 1392,  640,  128;
		

Crossrefs

Cf. A371301 (row sums), A370174, A256893.

Programs

  • Maple
    T := proc(n, k) option remember; if k > n or k < 0 then 0 elif k = 0 then 1 else
    2*T(n-1, k-1) + T(n-1, k) + T(n-2, k-1) + T(n-2, k) fi end:
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;  # Peter Luschny, Apr 22 2024
  • SageMath
    # using function riordan_array from A256893
    riordan_array(1/(1 - x), (1 + x)/(1 - x - x^2), 8)

Formula

T(n, k) = 2*T(n-1, k-1) + T(n-1, k) + T(n-2, k-1) + T(n-2, k), T(n, k) = 0 if k > n or if k < 0, T(n, 0) = 1. - Philippe Deléham , Apr 22 2024