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.

A208101 Triangle read by rows: T(n,0) = 1; for n > 0: T(n,1) = n, for n>1: T(n,n) = T(n-1,n-2); T(n,k) = T(n-2,k-1) + T(n-1,k) for k: 1 < k < n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 2, 1, 4, 3, 5, 2, 1, 5, 4, 9, 5, 5, 1, 6, 5, 14, 9, 14, 5, 1, 7, 6, 20, 14, 28, 14, 14, 1, 8, 7, 27, 20, 48, 28, 42, 14, 1, 9, 8, 35, 27, 75, 48, 90, 42, 42, 1, 10, 9, 44, 35, 110, 75, 165, 90, 132, 42, 1, 11, 10, 54, 44, 154, 110
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 04 2012

Keywords

Comments

Another variant of Pascal's triangle, cf. A007318.

Examples

			The triangle begins:
0:                    1
1:                  1   1
2:                1   2   1
3:              1   3   2   2
4:            1   4   3   5   2
5:          1   5   4   9   5   5
6:        1   6   5  14   9  14   5
7:      1   7   6  20  14  28  14  14
8:    1   8   7  27  20  48  28  42  14
9:  1   9   8  35  27  75  48  90  42  42
		

Crossrefs

Cf. A208976 (row sums), A101461 (row max), A208983 (central), A208355 (right edge), A074909.

Programs

  • Haskell
    a208101 n k = a208101_tabl !! n !! k
    a208101_row n = a208101_tabl !! n
    a208101_tabl =  iterate
       (\row -> zipWith (+) ([0,1] ++ init row) (row ++ [0])) [1]
  • Mathematica
    T[, 0] = 1; T[n, 1] := n; T[n_, n_] := T[n-1, n-2]; T[n_, k_] /; 1Jean-François Alcover, Feb 03 2018 *)