|
|
A094618
|
|
a(n) = 3^(n+1) - 2^(n+1) + n + 1.
|
|
2
|
|
|
2, 7, 22, 69, 216, 671, 2066, 6313, 19180, 58035, 175110, 527357, 1586144, 4766599, 14316154, 42981201, 129009108, 387158363, 1161737198, 3485735845, 10458256072, 31376865327, 94134790242, 282412759289, 847255055036
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|