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.
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
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..4182
- Joseph Myers, BMO 2008--2009 Round 1 Problem 1---Generalisation
- Index entries for linear recurrences with constant coefficients, signature (0,3).
Programs
-
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 *)
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)