OFFSET
0,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (0,5,0,-4).
FORMULA
a(n) = 2*(2^n - 1)*(2 - (-1)^n)/3.
a(2n) = A020988(n-1).
From Ralf Stephan, Mar 07 2003: (Start)
G.f.: (4*x^3+2*x^2+2*x)/(4*x^4-5*x^2+1).
a(n+4) = 5*a(n+2) - 4*a(n). (End)
EXAMPLE
a(2)=2 since there are nine equally likely possibilities, with times required of 0,1,1,2,2,3,3,3,3 giving an average of 18/9 = 2/1.
PROG
(PARI) a(n)={2*(2^n - 1)*(2 - (-1)^n)/3} \\ Harry J. Smith, Jul 07 2009
CROSSREFS
KEYWORD
easy,frac,nonn
AUTHOR
Henry Bottomley, Apr 05 2001
STATUS
approved