OFFSET
0,8
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
FORMULA
(row 0, the bottom row): r(n) = 2*r(n-2) + 2*r(n-3), with r(0) = 0, r(1) = 1, r(2) = 0;
(row 1, the middle row): r(n) = 2*r(n-2) + 2*r(n-3), with r(0) = 1, r(1) = 0, r(2) = 2;
(row 2, the top row): r(n) = 2*r(n-2) + 2*r(n-3), with r(0) = 0, r(1) = 1, r(2) = 1.
From Chai Wah Wu, Jan 24 2020: (Start)
a(n) = 2*a(n-6) + 2*a(n-9) for n > 8.
G.f.: (-x^8 - x^5 - x^3 - x)/(2*x^9 + 2*x^6 - 1). (End)
EXAMPLE
First 10 columns:
0 .. 1 .. 1 .. 2 .. 4 .. 6 .. 12 .. 20 .. 36 .. 64
1 .. 0 .. 2 .. 2 .. 4 .. 8 .. 12 .. 24 .. 40 .. 72
0 .. 1 .. 0 .. 2 .. 2 .. 4 .. 8 ... 12 .. 24 .. 40
T(4,1) counts these 4 paths, given as vector sums applied to (0,0):
(1,1) + (1,-1) + (1,1) + (1,-1);
(1,1) + (1,-1) + (1,-1) + (1,1);
(1,-1) + (1,1) + (1,-1) + (1,1);
(1,-1) + (1,1) + (1,1) + (1,-1).
MATHEMATICA
t[0, 0] = 0; t[0, 1] = 1; t[0, 2] = 0;
t[1, 0] = 1; t[1, 1] = 0; t[1, 2] = 1;
t[2, 0] = 0; t[2, 1] = 2; t[2, 2] = 1; 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, 0];
t[n_, 2] := t[n, 2] = t[n - 1, 1] + t[n - 2, 1];
TableForm[Reverse[Transpose[Table[t[n, k], {n, 0, 12}, {k, 0, 2}]]]]
Flatten[Table[t[n, k], {n, 0, 20}, {k, 0, 2}]] (* A247302 *)
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Clark Kimberling, Sep 11 2014
STATUS
approved