OFFSET
0,2
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.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-3,-9).
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)
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Edward Omey, Jun 16 2011
EXTENSIONS
More terms from Michel Marcus, Oct 16 2014
STATUS
approved