OFFSET
0,2
COMMENTS
n-th difference of a(n), a(n-1), ..., a(0) is (6, 12, 18, ...).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-8,4).
FORMULA
a(n) = 6*n * 2^(n-1) + 1.
G.f.: (1 + 2*x - 2*x^2) / ((1 - x) * (1 - 2*x)^2).
a(n) = 5*a(n-1)-8*a(n-2)+4*a(n-3) for n>2. - Colin Barker, Feb 18 2016
PROG
(Magma) [6*n * 2^(n-1) + 1: n in [0..30]]; // Vincenzo Librandi, Sep 23 2011
(PARI) {a(n) = if( n<0, 0, 3 * n * 2^n + 1)}; /* Michael Somos, May 13 2014 */
(PARI) Vec((1+2*x-2*x^2)/((1-x)*(1-2*x)^2) + O(x^40)) \\ Colin Barker, Feb 18 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved