OFFSET
0,1
COMMENTS
See the array and triangle A198632 for the general case for the graph P_N (there N is n and the length is l = 2*k).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-3).
FORMULA
a(n) = w(5,2*n), n >= 0, with w(5,l) the total number of closed walks on the graph P_5 (the simple path with 5 points (vertices) and 4 lines (or edges)).
O.g.f. for w(5,l) (with zeros for odd l): y*(d/dy)S(5,y)/S(5,y) with y = 1/x and Chebyshev S-polynomials (coefficients A049310). See also A198632 for a rewritten form.
G.f.: (5-12*x+3*x^2)/(1-4*x+3*x^2). - Colin Barker, Jan 02 2012
a(n) = 3*a(n-1) - 4, n > 1. - Vincenzo Librandi, Jan 02 2012
a(n) = 2*3^n + 2 for n > 0. - Andrew Howroyd, Mar 18 2017
a(n) = 2*A034472(n) for n > 0. - Andrew Howroyd, Mar 18 2017
EXAMPLE
With the graph P_5 as 1-2-3-4-5:
n=0: 5, from the length 0 walks starting at 1,2,3,4 and 5.
n=1: 8, from the walks of length 2, namely 121, 212, 232, 323, 343, 434, 454 and 545.
MATHEMATICA
a[0] = 5; a[n_] := 2*3^n + 2; Array[a, 28, 0] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)
CoefficientList[Series[(5 - 12 x + 3 x^2)/(1 - 4 x + 3 x^2), {x, 0, 27}], x] (* Michael De Vlieger, Dec 18 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Nov 02 2011
STATUS
approved