OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
É. Czabarka, R. Flórez, and L. Junes, A Discrete Convolution on the Generalized Hosoya Triangle, Journal of Integer Sequences, 18 (2015), #15.1.6.
Index entries for linear recurrences with constant coefficients, signature (2, 1, -2, -1).
FORMULA
From Wolfdieter Lang, Apr 24 2001: (Start)
a(n) = A060922(n, 1) (second column of Lucas triangle).
G.f.: x*((1+2*x)/(1-x-x^2))^2. (End)
MAPLE
a:= n-> (Matrix([[17, 6, 1, 0]]). Matrix(4, (i, j)-> if i=j-1 then 1 elif j=1 then [2, 1, -2, -1][i] else 0 fi)^n) [1, 4]: seq (a(n), n=1..40); # Alois P. Heinz, Oct 28 2008
MATHEMATICA
a[n_]:= ((5*n-4)*LucasL[n+1] + 2*LucasL[n])/5; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 12 2015 *)
PROG
(PARI) Vec(x*((1+2*x)/(1-x-x^2))^2 + O(x^50)) \\ Altug Alkan, Nov 12 2015
(Magma) [((5*n-4)*Lucas(n+1) + 2*Lucas(n))/5: n in [1..30]]; // G. C. Greubel, Dec 17 2017
(Sage) [((5*n-4)*lucas_number2(n+1, 1, -1) + 2*lucas_number2(n, 1, -1))/5 for n in (1..30)] # G. C. Greubel, Apr 07 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Alois P. Heinz, Oct 28 2008
STATUS
approved