OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-1,1).
FORMULA
From Colin Barker, Jun 29 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: x^2*(5-4*x)/((1-x)^2*(1-x-x^2)). (End)
a(n) = Fibonacci(n+3) + 4*Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019
MATHEMATICA
With[{F = Fibonacci}, Table[F[n+3]+4*F[n+1]-n-6, {n, 0, 40}]] (* G. C. Greubel, Jul 09 2019 *)
PROG
(PARI) vector(40, n, n--; f=fibonacci; f(n+3)+4*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
(Magma) F:=Fibonacci; [F(n+3)+4*F(n+1)-n-6: n in [0..40]]; // G. C. Greubel, Jul 09 2019
(Sage) f=fibonacci; [f(n+3)+4*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
(GAP) F:=Fibonacci;; List([0..40], n-> F(n+3)+4*F(n+1)-n-6) # G. C. Greubel, Jul 09 2019
CROSSREFS
Cf. A033818: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=0 (except first 2 terms and sign).
Cf. A002062: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=0 (except the first term and sign).
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-3, a(0)=a(1)=0.
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=0 (except the first term).
Cf. A023548: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=0 (except first 2 terms).
Cf. A023552: a(n)=a(n-1)+a(n-2)+n+1, a(0)=a(1)=0 (except first 2 terms).
Cf. A210730: a(n)=a(n-1)+a(n-2)+n+2, a(0)=a(1)=0.
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, May 10 2012
STATUS
approved