OFFSET
0,2
COMMENTS
a(n)/3^n is the expected time to finish a random Tower of Hanoi problem with n disks using optimal moves.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (9,-18).
FORMULA
MATHEMATICA
Table[2 (2^n - 1) 3^(n - 1), {n, 0, 50}] (* or *) LinearRecurrence[{9, -18}, {0, 2}, 40] (* Vincenzo Librandi, Jul 03 2018 *)
PROG
(PARI) a(n)={2*(2^n - 1)*3^(n - 1)} \\ Harry J. Smith, Jul 07 2009
(Magma) [2*(2^n - 1)*3^(n - 1): n in [0..30]]; // Vincenzo Librandi, Jul 03 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Apr 05 2001
EXTENSIONS
Corrected by T. D. Noe, Nov 07 2006
STATUS
approved