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
a(n) = 3*n * 2^(n-1) - n + 1.
From Colin Barker, Feb 20 2016: (Start)
a(n) = 6*a(n-1)-13*a(n-2)+12*a(n-3)-4*a(n-4) for n>3.
G.f.: (1-3*x+6*x^2-5*x^3) / ((1-x)^2*(1-2*x)^2).
(End)
MATHEMATICA
LinearRecurrence[{6, -13, 12, -4}, {1, 3, 11, 34}, 40] (* Harvey P. Dale, Jul 21 2024 *)
PROG
(PARI) Vec((1-3*x+6*x^2-5*x^3)/((1-x)^2*(1-2*x)^2) + O(x^40)) \\ Colin Barker, Feb 20 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved