login
A200859
a(n) = 2*a(n-1)+3*a(n-2)+5^n for n>1, a(0)=-2, a(1)=1.
2
-2, 1, 21, 170, 1028, 5691, 30091, 155380, 791658, 4002581, 20145761, 101127390, 506832688, 2537750671, 12699515031, 63529860200, 317746156118, 1589021345961, 7945978425901, 39732507217810, 198670381353948, 993375442564451, 4966947820206371, 24834950923184220
OFFSET
0,1
REFERENCES
B. Satyanarayana and K. S. Prasad, Discrete Mathematics and Graph Theory, PHI Learning Pvt. Ltd. (Eastern Economy Edition), 2009, p. 81 (3.1;4)
FORMULA
G.f.: -(2-15*x)/((1+x)*(1-3*x)*(1-5*x)).
a(n) = 7*a(n-1)-7*a(n-1)-15*a(n-3) for n>2, a(0)=-2, a(1)=1, a(2)=21.
a(n) = (50*5^n-81*3^n-17*(-1)^n)/24.
MAPLE
A200859:=n->(50*5^n-81*3^n-17*(-1)^n)/24; seq(A200859(n), n=0..30); # Wesley Ivan Hurt, Dec 26 2013
MATHEMATICA
LinearRecurrence[{7, -7, -15}, {-2, 1, 21}, 24]
nxt[{n_, a_, b_}]:={n+1, b, 2b+3a+5^(n+1)}; NestList[nxt, {1, -2, 1}, 30][[All, 2]] (* Harvey P. Dale, Dec 28 2021 *)
PROG
(Magma) [n le 2 select 3*n-5 else 2*Self(n-1)+3*Self(n-2)+5^(n-1): n in [1..24]];
(PARI) for(n=0, 23, print1((50*5^n-81*3^n-17*(-1)^n)/24", "));
(Maxima) makelist(coeff(taylor(-(2-15*x)/((1+x)*(1-3*x)*(1-5*x)), x, 0, n), x, n), n, 0, 23);
(Sage)
def lr(a0, a1, a2, a3, a4, a5):
x, y, z = a0, a1, a2
while True:
yield x
x, y, z = y, z, a5*x+a4*y+a3*z
A200859 = lr(-2, 1, 21, 7, -7, -15)
print([next(A200859) for n in range(24)]) # Bruno Berselli, May 09 2014
CROSSREFS
Sequence in context: A345760 A213976 A330354 * A127607 A255861 A059360
KEYWORD
sign,easy
AUTHOR
Bruno Berselli, Nov 23 2011
STATUS
approved