OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Milan Janjić, On Restricted Ternary Words and Insets, arXiv:1905.04465 [math.CO], 2019.
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: 8*(1 + x)*x^2/(1 - x)^5. - Arkadiusz Wesolowski, Feb 08 2012
E.g.f.: 2*exp(x)*x^2*(6 + 6*x + x^2)/3. - Stefano Spezia, Dec 12 2021
a(n) = 2*n * A007290(n+1). - C.S. Elder, Jan 09 2024
EXAMPLE
a(2)=8 since for a random walk with absorbing boundaries at +2 or -2, the probability of first reaching a boundary at time t=2 is 1/2, at t=4 is 1/4, at t=6 is 1/8, at t=8 is 1/16, etc., giving a mean of 2/2 + 4/4 + 6/8 + 8/16 + ... = 4 and a variance of 2^2/2 + 4^2/4 + 6^2/8 + 8^2/16 + ... - 4^2 = 24 - 16 = 8.
MATHEMATICA
CoefficientList[Series[8 (1 + x) x^2/(1 - x)^5, {x, 0, 35}], x] (* Michael De Vlieger, Jul 02 2019 *)
PROG
(Magma) [n^2*(n^2-1)*2/3: n in [0..40]]; // Vincenzo Librandi, Sep 14 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jul 14 2002
STATUS
approved