OFFSET
0,1
LINKS
Carauleanu Marc, Table of n, a(n) for n = 0..400
S. W. Golomb, Properties of the sequence 3.2^n+1, Math. Comp., 30 (1976), 657-663.
Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
FORMULA
a(n) = 2*a(n-1) - n + 2.
a(n+1) - a(n) = A181565(n)
a(n) = A007283(n) + n - 1
From G. C. Greubel, Aug 18 2016: (Start)
O.g.f.: (2 - 2*x - x^2)/( (1-2*x)*(1-x)^2 ).
E.g.f.: 3*exp(2*x) + (x-1)*exp(x).
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-2). (End)
MATHEMATICA
LinearRecurrence[{4, -5, 2}, {2, 6, 13}, 25] (* or *) Table[3*2^n + n - 1, {n, 0, 25}] (* G. C. Greubel, Aug 18 2016 *)
PROG
(PARI) a(n)=3*2^n+n-1 \\ Charles R Greathouse IV, Aug 27 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Miquel Cerda, Aug 15 2016
STATUS
approved