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 (6,-13,12,-4).
FORMULA
a(n) = (1/4)*( 4*(n+1) + (n-1)*2^n + 0^n).
From Colin Barker, Oct 11 2014: (Start)
a(n) = A045618(n-4) + 2^n for n>3.
a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4) for n>4.
a(n) = (4 - 2^n + (4+2^n)*n)/4 for n>0.
G.f.: (x^4 - 2*x^3 + 5*x^2 - 4*x + 1) / ((x-1)^2*(2*x-1)^2).
(End)
E.g.f.: (1/4)*(1 + 4*(1 + x)*exp(x) + (2*x - 1)*exp(2*x)). - G. C. Greubel, Sep 06 2016
MATHEMATICA
Join[{1}, LinearRecurrence[{6, -13, 12, -4}, {2, 4, 8, 17}, 25]] (* or *) Table[(1/4)*( 4*(n+1) + (n-1)*2^n + 0^n), {n, 0, 25}] (* G. C. Greubel, Sep 06 2016 *)
PROG
(PARI) Vec((x^4-2*x^3+5*x^2-4*x+1)/((x-1)^2*(2*x-1)^2) + O(x^100)) \\ Colin Barker, Oct 11 2014
(Magma) [(1/4)*(4*(n+1)+(n-1)*2^n+0^n): n in [0..35]]; // Vincenzo Librandi, Sep 07 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jan 05 2009
EXTENSIONS
More terms and xrefs from Colin Barker, Oct 11 2014
STATUS
approved