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.

A191008 a(n) = (n*3^(n+1)+((5*3^(n+1)+(-1)^(n))/4))/4.

Original entry on oeis.org

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

Views

Author

Edward Omey, Jun 16 2011

Keywords

Comments

Another renewal type of sequence. Let X, X(1), X(2),... denote random variables with pdf P(X = 1) = P(X = 4 ) = 1/4 and P(X = 2) = 1/2. Let N(x) denote the first value of k such that X(1)*X(2)*...*X(k) > x and let H(x)= E(N(x)). The sequence is given by a(n) = 3^(n+1)*H(2^n)/4.

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