OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2, 7, 2, -1).
FORMULA
a(n) = 2*a(n-1)+7*a(n-2)+2*a(n-3)-a(n-4). G.f.: -x*(2*x^3-3*x^2-7*x-1) / (x^4-2*x^3-7*x^2-2*x+1). - Colin Barker, Oct 15 2013
MATHEMATICA
L[0] = 2; L[1] = 1; L[n] = L[n - 1] + L[n - 2]; P[0] = P[1] = 1; P[n_] := P[n] = 2P[n - 1] + P[n - 2]; Table[ L[n]P[n], {n, 1, 24}]
With[{nn=30}, Rest[LinearRecurrence[{2, 1}, {1, 1}, nn]LucasL[Range[0, nn-1]]]] (* Harvey P. Dale, Apr 20 2012 *)
LinearRecurrence[{2, 7, 2, -1}, {1, 9, 28, 119}, 24] (* Ray Chandler, Aug 03 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jun 24 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 24 2003
STATUS
approved