login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A247311
Rectangular array read upwards by columns: T = T(n,k) = number of paths from (0,1) to (n,k), where 0 <= k <= 2, consisting of segments given by the vectors (1,1), (1,0), (1,-1).
2
1, 0, 0, 1, 1, 0, 2, 2, 1, 4, 5, 3, 9, 12, 8, 21, 29, 20, 50, 70, 49, 120, 169, 119, 289, 408, 288, 697, 985, 696, 1682, 2378, 1681, 4060, 5741, 4059, 9801, 13860, 9800, 23661, 33461, 23660, 57122, 80782, 57121, 137904, 195025, 137903, 332929, 470832, 332928
OFFSET
0,7
COMMENTS
Also, T(n,k) = number of strings s(0)..s(n) of integers such that s(0) = 0, s(n) = k, and for 0 < i <= n, s(i) is in {0,1,2}, and s(i) - s(i-1) is in {-1,0,1}.
(row 0, the bottom row): A024537;
(row 1, the middle row): A000129;
(row 2, the top row): A048739;
(n-th column sum): A000129.
LINKS
EXAMPLE
First 10 columns:
0 .. 0 .. 1 .. 3 .. 8 ... 20 .. 49 .. 119 .. 288 .. 696
0 .. 1 .. 2 .. 5 .. 12 .. 29 .. 70 .. 169 .. 408 .. 985
1 .. 1 .. 2 .. 4 .. 9 ... 21 .. 50 .. 120 .. 289 .. 697
T(3,2) counts these 3 paths, given as vector sums applied to (0,0):
(1,1) + (1,1) + (1,0); (1,1) + (1,0) + (1,1); (1,0) + (1,1) + (1,1).
MATHEMATICA
t[0, 0] = 1; t[0, 1] = 0; t[0, 2] = 0; t[1, 2] = 0;
t[n_, 0] := t[n, 0] = t[n - 1, 0] + t[n - 1, 1];
t[n_, 1] := t[n, 1] = t[n - 1, 0] + t[n - 1, 1] + t[n - 1, 2];
t[n_, 2] := t[n, 2] = t[n - 1, 1] + t[n - 1, 2]
TableForm[Reverse[Transpose[Table[t[n, k], {n, 0, 12}, {k, 0, 2}]]]] (* array *)
Flatten[Table[t[n, k], {n, 0, 20}, {k, 0, 2}]] (* A247311 *)
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Clark Kimberling, Sep 12 2014
STATUS
approved