%I #10 Sep 14 2014 14:26:57
%S 1,0,0,0,1,1,2,1,0,0,2,3,5,3,0,0,5,8,13,8,0,0,13,21,34,21,0,0,34,55,
%T 89,55,0,0,89,144,233,144,0,0,233,377,610,377,0,0,610,987,1597,987,0,
%U 0,1597,2584,4181,2584,0,0,4181,6765,10946,6765,0,0,10946
%N 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,2), (1,-1), (1,-2), where no segment is followed by a segment in the same direction.
%C Also, T(n,k) = number of strings s(0)..s(n) of integers such that s(0) = 0, s(n) = k, s(i) is in {0,1,2} for i = 0..n, and for i > 0, s(i) - s(i-1) is in {1,2} if i is odd, and s(i) - s(i-1) is in {-1,-2} if i is even. Every row of T consists of Fibonacci numbers, and (sum of numbers in column n) = A000045(n+1).
%H Clark Kimberling, <a href="/A247310/b247310.txt">Table of n, a(n) for n = 0..1000</a>
%F Let F = A000045 (Fibonacci numbers); then
%F (row 0, the bottom row): F(1), 0 , F(3), 0 , F(5), 0, ...
%F (row 1, the middle row): F(0), F(1), F(2), F(3), F(4), F(5), ...
%F (row 2, the top row): 0, F(2), 0, F(4), 0, F(6) , 0, ...
%e First 10 columns:
%e 0 .. 1 .. 0 .. 3 .. 0 .. 8 .. 0 ... 21 .. 0 ... 55
%e 0 .. 1 .. 1 .. 2 .. 3 .. 5 .. 8 ... 13 .. 21 .. 34
%e 1 .. 0 .. 2 .. 0 .. 5 .. 0 .. 13 .. 0 ... 34 .. 0
%e T(3,2) counts these 3 paths, given as vector sums applied to (0,0):
%e (1,2) + (1,-1) + (1,1);
%e (1,1) + (1,-1) + (1,2);
%e (1,2) + (1,-2) + (1,2).
%t t[0, 0] = 1; t[0, 1] = 0; t[0, 2] = 0;
%t t[1, 0] = 0; t[1, 1] = 1; t[1, 2] = 1;
%t t[2, 0] = 2; t[2, 1] = 1; t[2, 2] = 0;
%t t[n_, 0] := If[OddQ[n], 0 , t[n - 1, 1] + t[n - 1, 2]]
%t t[n_, 1] := If[OddQ[n], t[n - 1, 0] , t[n - 1, 2]]
%t t[n_, 2] := If[OddQ[n], t[n - 1, 0] + t[n - 1, 1], 0]
%t TableForm[Reverse[Transpose[Table[t[n, k], {n, 0, 12}, {k, 0, 2}]]]] (* array *)
%t u = Flatten[Table[t[n, k], {n, 0, 25}, {k, 0, 2}]] (* A247310 *)
%Y Cf. A247049, A247309, A000045.
%K nonn,tabf,easy
%O 0,7
%A _Clark Kimberling_, Sep 12 2014