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.

A247622 Triangular array: T(n,k) = number of paths from (0,0) to (n,k), each segment given by a vector (1,1), (1,-1), or (2,0), not crossing the x-axis, and including no horizontal segment on the x-axis.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 3, 0, 5, 0, 1, 0, 11, 0, 7, 0, 1, 11, 0, 23, 0, 9, 0, 1, 0, 45, 0, 39, 0, 11, 0, 1, 45, 0, 107, 0, 59, 0, 13, 0, 1, 0, 197, 0, 205, 0, 83, 0, 15, 0, 1, 197, 0, 509, 0, 347, 0, 111, 0, 17, 0, 1, 0, 903, 0, 1061, 0, 541, 0, 143, 0
Offset: 0

Views

Author

Clark Kimberling, Sep 21 2014

Keywords

Examples

			First 9 rows:
1
0 ... 1
1 ... 0 ... 1
0 ... 3 ... 0 ... 1
3 ... 0 ... 5 ... 0 ... 1
0 ... 11 .. 0 ... 7 ... 0 ...1
11 .. 0 ... 23 .. 0 ... 9 ... 0 ... 1
0 ... 45 .. 0 ... 39 .. 0 ... 11 .. 0 ... 1
45 .. 0 ... 107 . 0 ... 59 .. 0 ... 13 .. 0 ... 1
T(3,1) counts these 3 paths given as vector sums applied to (0,0):
(1,1) + (1,-1), (2,0), (1,-1) + (1,1).
		

Crossrefs

Cf. A247623, A247629, A026300, A001003 (1st column of this triangle).

Programs

  • Mathematica
    t[0, 0] = 1; t[1, 1] = 1; t[2, 0] = 1; t[2, 2] = 1; t[n_, k_] := t[n, k] = If[n >= 2 && k >= 1, t[n - 1, k - 1] + t[n - 1, k + 1] + t[n - 2, k], 0]; t[n_, 0] := t[n, 0] = t[n - 1, 1]; u = Table[t[n, k], {n, 0, 16}, {k, 0, n}];
    v = Flatten[u] (* A247622 sequence *)
    TableForm[u]   (* A247622 array *)
    Map[Total, u]  (* A247623 *)