OFFSET
0,2
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
FORMULA
G.f.: (1-x+3*x^2-2*x^3)/((1-x)^2*(1-x-x^2)). - Bruno Berselli, Jun 27 2012
a(n) = ((5+sqrt(5))*(1+sqrt(5))^(n+1)-(5-sqrt(5))*(1-sqrt(5))^(n+1))/(2^(n+1)*sqrt(5))-n-5. - Bruno Berselli, Jun 27 2012
a(n) = -n-5+A022112(n+1). R. J. Mathar, Jul 03 2012
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 2, a[n] == a[n - 1] + a[n - 2] + n + 2}, a, {n, 36}] (* Bruno Berselli, Jun 27 2012 *)
nxt[{n_, a_, b_}]:={n+1, b, a+b+n+3}; NestList[nxt, {1, 1, 2}, 40][[;; , 2]] (* Harvey P. Dale, Aug 26 2024 *)
CROSSREFS
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210729: a(n)=a(n-1)+a(n-2)+n+3, a(0)=1,a(1)=2.
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, May 10 2012
STATUS
approved