# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a007798 Showing 1-1 of 1 %I A007798 #39 Sep 08 2022 08:44:35 %S A007798 0,0,2,18,116,660,3542,18438,94376,478440,2411882,12118458,60769436, %T A007798 304378620,1523487422,7622220078,38125449296,190670293200, %U A007798 953480606162,4767790451298,23840114517956,119204059374180,596030757224102,2980185167180118,14901019979079416 %N A007798 Expected number of random moves in Tower of Hanoi problem with n disks starting with a randomly chosen position and ending at a position with all disks on the same peg. %C A007798 All 3^n possible starting positions are chosen with equal probability. %H A007798 Vincenzo Librandi, Table of n, a(n) for n = 0..1000 %H A007798 M. A. Alekseyev and T. Berger, Solving the Tower of Hanoi with Random Moves. In: J. Beineke, J. Rosenhouse (eds.) The Mathematics of Various Entertaining Subjects: Research in Recreational Math, Princeton University Press, 2016, pp. 65-79. ISBN 978-0-691-16403-8 %H A007798 Index entries for linear recurrences with constant coefficients, signature (9,-23,15). %H A007798 Index entries for sequences related to Towers of Hanoi %F A007798 For n>1, a(n) = 8*a(n-1) - 15*a(n-2) + 2 = 2*A016209(n-2). - _Henry Bottomley_, Jun 06 2000 %F A007798 a(n) = (5^n - 2*3^n + 1) / 4. - _Henry Bottomley_, Jun 06 2000, proved by _Max Alekseyev_, Feb 04 2008 %F A007798 From _Colin Barker_, Sep 17 2014: (Start) %F A007798 a(n) = 9*a(n-1) - 23*a(n-2) + 15*a(n-3). %F A007798 G.f.: 2*x^2/((1-x)*(1-3*x)*(1-5*x)). (End) %F A007798 E.g.f.: (exp(x) - 2*exp(3*x) + exp(5*x))/4. - _G. C. Greubel_, Mar 05 2020 %p A007798 seq( (1 -2*3^n +5^n)/4, n=0..25); # _G. C. Greubel_, Mar 05 2020 %t A007798 Table[(1 -2*3^n +5^n)/4, {n,0,25}] (* _G. C. Greubel_, Mar 05 2020 *) %o A007798 (Magma) [(5^n-2*3^n+1)/4: n in [0..25]]; // _Vincenzo Librandi_, Oct 11 2011 %o A007798 (PARI) concat([0,0], Vec(-2*x^2/((x-1)*(3*x-1)*(5*x-1)) + O(x^30))) \\ _Colin Barker_, Sep 17 2014 %o A007798 (Sage) [(1 -2*3^n +5^n)/4 for n in (0..25)] # _G. C. Greubel_, Mar 05 2020 %Y A007798 Partial sums of A005058. %Y A007798 Cf. A134939. %K A007798 nonn,easy %O A007798 0,3 %A A007798 David G. Poole (dpoole(AT)trentu.ca) %E A007798 More precise definition and more terms from _Max Alekseyev_, Feb 04 2008 %E A007798 a(0)=0 prepended by _Max Alekseyev_, Sep 08 2014 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE