OFFSET
1,1
COMMENTS
Also (starting 5,8,...) the number of zig-zag paths from top to bottom of a rectangle of width 5. - Joseph Myers, Dec 23 2008
Number of walks of length n on the path graph P_5. - Andrew Howroyd, Apr 17 2017
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
B. Malesevic, Some combinatorial aspects of differential operation composition on the space R^n, Univ. Beograd, Publ. Elektrotehn. Fak., Ser. Mat. 9 (1998), 29-33.
Branko Malesevic, Some combinatorial aspects of differential operation compositions on space R^n, arXiv:0704.0750 [math.DG], 2007.
Joseph Myers, BMO 2008--2009 Round 1 Problem 1---Generalisation
Index entries for linear recurrences with constant coefficients, signature (0,3).
FORMULA
a(n+4) = 4*a(n+2) - 3*a(n).
From Colin Barker, May 03 2012: (Start)
a(n) = 3*a(n-2).
G.f.: 2*x*(4+7*x)/(1-3*x^2). (End)
a(n) = (11+3*(-1)^n) * 3^floor((n-1)/2). - Ralf Stephan, Jul 19 2013
MAPLE
NUM := proc(k :: integer) local i, j, n, Fun, Identity, v, A; n := 8; # <- DIMENSION Fun := (i, j)->piecewise(((j=i+1) or (i+j=n+1)), 1, 0); Identity := (i, j)->piecewise(i=j, 1, 0); v := matrix(1, n, 1); A := piecewise(k>1, (matrix(n, n, Fun))^(k-1), k=1, matrix(n, n, Identity)); return(evalm(v&*A&*transpose(v))[1, 1]); end:
MATHEMATICA
LinearRecurrence[{0, 3}, {8, 14}, 32] (* Jean-François Alcover, Jul 01 2018 *)
PROG
(PARI) my(x='x+O('x^40)); Vec(2*x*(4+7*x)/(1-3*x^2)) \\ G. C. Greubel, Feb 02 2019
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( 2*x*(4+7*x)/(1-3*x^2) )); // G. C. Greubel, Feb 02 2019
(Sage) a=(2*x*(4+7*x)/(1-3*x^2)).series(x, 40).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 02 2019
(GAP) a:=[8, 14];; for n in [3..40] do a[n]:=3*a[n-2]; od; a; # G. C. Greubel, Feb 02 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Branko Malesevic, Feb 29 2004
EXTENSIONS
More terms from Joseph Myers, Dec 23 2008
STATUS
approved