OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-1).
FORMULA
From R. J. Mathar, Apr 07 2011: (Start)
G.f.: (1 +4*x -4*x^2)/( (1-x)*(1-x-x^2) ).
a(n) = A022113(n) - 1. (End)
a(n) = 2*F(n+2) + 3*F(n) - 1, where F = A000045. - G. C. Greubel, Aug 25 2017
MATHEMATICA
LinearRecurrence[{2, 0, -1}, {1, 6, 8}, 50] (* G. C. Greubel, Aug 25 2017 *)
nxt[{a_, b_}]:={b, a+b+1}; NestList[nxt, {1, 6}, 40][[;; , 1]] (* Harvey P. Dale, Mar 29 2024 *)
PROG
(PARI) x='x+O('x^50); Vec((1 +4*x -4*x^2)/((1-x)*(1-x-x^2))) \\ G. C. Greubel, Aug 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved