A191008 a(n) = (n*3^(n+1)+((5*3^(n+1)+(-1)^(n))/4))/4.
1, 5, 22, 86, 319, 1139, 3964, 13532, 45517, 151313, 498226, 1627538, 5281195, 17039327, 54705208, 174877304, 556916953, 1767605981, 5593383310, 17651846030, 55570626391, 174557144075, 547207226932, 1712229064916, 5348509347109, 16680994498409, 51949382866474
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-3,-9).
Programs
-
Maple
A191008:=n->(n*3^(n+1)+((5*3^(n+1)+(-1)^(n))/4))/4: seq(A191008(n), n=0..40); # Wesley Ivan Hurt, May 03 2017
-
Mathematica
LinearRecurrence[{5, -3, -9}, {1, 5, 22}, 27] (* or *) CoefficientList[Series[1/((1 + x) (1 - 3 x)^2), {x, 0, 26}], x] (* Michael De Vlieger, May 03 2017 *)
-
PARI
a(n)=(n*3^(n+1)+((5*3^(n+1)+(-1)^(n))/4))/4; \\ Michel Marcus, Oct 16 2014
-
PARI
Vec(1 / ((1 + x)*(1 - 3*x)^2) + O(x^30)) \\ Colin Barker, May 03 2017
Formula
a(n) = (n*3^(n+1)+((5*3^(n+1)+(-1)^(n))/4))/4.
From Colin Barker, May 03 2017: (Start)
G.f.: 1 / ((1 + x)*(1 - 3*x)^2).
a(n) = 5*a(n-1) - 3*a(n-2) - 9*a(n-3) for n>2.
(End)
Extensions
More terms from Michel Marcus, Oct 16 2014
Comments