OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-13,12,-4).
FORMULA
From Colin Barker, Nov 25 2014: (Start)
a(n) = (-10 + 11*2^n + 2*(-3 + 2^n)*n).
a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4).
G.f.: (1 + 4*x - 9*x^2 - 2*x^3) / ((1-x)^2*(1-2*x)^2). (End)
E.g.f.: (11 + 4*x)*exp(2*x) - 2*(5 + 3*x)*exp(x). - G. C. Greubel, Jun 07 2025
MATHEMATICA
LinearRecurrence[{6, -13, 12, -4}, {1, 10, 38, 108}, 40] (* Harvey P. Dale, Oct 28 2020 *)
PROG
(PARI) Vec((1+4*x-9*x^2-2*x^3)/((1-x)^2*(1-2*x)^2) + O(x^100)) \\ Colin Barker, Nov 25 2014
(Magma)
A027982:= func< n | (2*n+11)*2^n -2*(3*n+5) >; // G. C. Greubel, Jun 07 2025
(Python)
def A027982(n): return (2*n+11)*2**n -2*(3*n+5) # G. C. Greubel, Jun 07 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Colin Barker, Nov 25 2014
STATUS
approved
