cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A200859 a(n) = 2*a(n-1)+3*a(n-2)+5^n for n>1, a(0)=-2, a(1)=1.

Original entry on oeis.org

-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

Views

Author

Bruno Berselli, Nov 23 2011

Keywords

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)

Crossrefs

Programs

  • Magma
    [n le 2 select 3*n-5 else 2*Self(n-1)+3*Self(n-2)+5^(n-1): n in [1..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 *)
  • Maxima
    makelist(coeff(taylor(-(2-15*x)/((1+x)*(1-3*x)*(1-5*x)), x, 0, n), x, n), n, 0, 23);
    
  • PARI
    for(n=0, 23, print1((50*5^n-81*3^n-17*(-1)^n)/24", "));
    
  • 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

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.
Showing 1-1 of 1 results.