login
A153339
Number of zig-zag paths from top to bottom of a rectangle of width 5 with n rows whose color is that of the top right corner.
2
3, 4, 8, 12, 24, 36, 72, 108, 216, 324, 648, 972, 1944, 2916, 5832, 8748, 17496, 26244, 52488, 78732, 157464, 236196, 472392, 708588, 1417176, 2125764, 4251528, 6377292, 12754584, 19131876, 38263752, 57395628, 114791256, 172186884
OFFSET
1,1
FORMULA
a(2n) = 4*3^(n-1), a(2n+1) = 8*3^(n-1) for n > 0, a(1)=3.
From Colin Barker, May 10 2012: (Start)
a(n) = 3*a(n-2) for n > 3.
G.f.: x*(3+4*x-x^2)/(1-3*x^2). (End)
MATHEMATICA
a[1]=3; a[2]=4; a[3]=8; a[n_]:=3 a[n-2]; Table[a[n], {n, 1, 34}] (* or *) LinearRecurrence[{0, 3}, {3, 4, 8}, 34] (* Indranil Ghosh, Feb 20 2017 *)
CROSSREFS
Sequence in context: A052952 A245121 A329730 * A275989 A343562 A375420
KEYWORD
easy,nonn
AUTHOR
Joseph Myers, Dec 24 2008
STATUS
approved