OFFSET
0,11
COMMENTS
Also, T(n,k) = number of strings s(0)..s(n) of integers such that s(0) = 0, s(n) = k, and if i > 0, then s(i) is in {0,1,2} and s(i) - s(i-1) is in {1,2,-1}. Every row of T is a Fibonacci sequence (A000045), as is the sequence of column sums.
This is a 3-rowed array read upwards by columns. - N. J. A. Sloane, Sep 14 2014
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
FORMULA
Let F = A000045, the Fibonacci numbers. Then (row 0, the bottom row) = F(n-1) for n >= 0; (row 1, the middle row) = F(n) for n >=0; (row 2, the top row) = (row 1).
EXAMPLE
First 10 columns:
0 .. 1 .. 1 .. 2 .. 3 .. 5 .. 8 .. 13 .. 21 .. 34
0 .. 1 .. 1 .. 2 .. 3 .. 5 .. 8 .. 13 .. 21 .. 34
1 .. 0 .. 1 .. 1 .. 2 .. 3 .. 5 .. 8 ... 13 .. 21
T(4,1) counts these 3 paths, given as vector sums applied to (0,0):
(1,2) + (1,-1) + (1,1) + (1,-1);
(1,1) + (1,-1) + (1,2) + (1,-1);
(1,2) + (1,-1) + (1,-1) + (1,1).
Partial sums of second components in each vector sum give the 3 integer strings described in Comments: (0,2,1,2,1), (0,1,0,2,1), (0,2,1,0,1).
MATHEMATICA
t[0, 0] = 1; t[0, 1] = 0; t[0, 2] = 0; t[n_, 0] := t[n, 0] = t[n - 1, 1]; t[n_, 1] := t[n, 1] = t[n - 1, 0] + t[n - 1, 2]; t[n_, 2] := t[n, 2] = t[n - 1, 0] + t[n - 1, 1]; TableForm[ Reverse[Transpose[Table[t[n, k], {n, 0, 12}, {k, 0, 2}]]]] (* array *)
u = Flatten[Table[t[n, k], {n, 0, 20}, {k, 0, 2}]] (* sequence *)
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Clark Kimberling, Sep 11 2014
STATUS
approved