OFFSET
0,1
COMMENTS
Row sums of A094617.
LINKS
Robert Israel, Table of n, a(n) for n = 0..2092
Index entries for linear recurrences with constant coefficients, signature (7,-17,17,-6).
FORMULA
a(n) = 2*a(n-1) + 1 - n + 3^n, a(0) = 2.
G.f.: (2-7*x+7*x^2)/(1-7*x+17*x^2-17*x^3+6*x^4). - Robert Israel, Jul 22 2018
MAPLE
seq(3^(n+1) - 2^(n+1) + n + 1, n=0..100); # Robert Israel, Jul 22 2018
MATHEMATICA
Table[3^(n+1)-2^(n+1)+n+1, {n, 0, 30}] (* or *) LinearRecurrence[{7, -17, 17, -6}, {2, 7, 22, 69}, 30] (* Harvey P. Dale, Oct 11 2022 *)
PROG
(PARI) a(n) = 3^(n+1) - 2^(n+1) + n + 1; \\ Michel Marcus, Jun 05 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 14 2004
EXTENSIONS
New definition from Ralf Stephan, Dec 01 2004
STATUS
approved