cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005666 Minimal number of moves for the cyclic variant of the Towers of Hanoi for 3 pegs and n disks, with the final peg two steps away.

This page as a plain text file.
%I A005666 M1755 #81 Jul 28 2025 18:03:18
%S A005666 0,2,7,21,59,163,447,1223,3343,9135,24959,68191,186303,508991,1390591,
%T A005666 3799167,10379519,28357375,77473791,211662335,578272255,1579869183,
%U A005666 4316282879,11792304127,32217174015,88018956287,240472260607,656982433791,1794909388799
%N A005666 Minimal number of moves for the cyclic variant of the Towers of Hanoi for 3 pegs and n disks, with the final peg two steps away.
%C A005666 Original name was: Tower of Hanoi with 3 pegs and cyclic moves only (counterclockwise). - _Jianing Song_, Nov 01 2024
%D A005666 R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 18.
%D A005666 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A005666 J.-P. Allouche, <a href="http://dx.doi.org/10.1016/0304-3975(94)90064-7">Note on the cyclic towers of Hanoi</a>, Theoret. Comput. Sci., 123 (1994), 3-7.
%H A005666 M. D. Atkinson, <a href="http://www.cs.otago.ac.nz/staffpriv/mike/Papers/Hanoi/CyclicHanoi.pdf">The Cyclic Towers of Hanoi</a>, Info. Proc. Letters, 13 (1981), 118-119.
%H A005666 R. K. Guy, <a href="/A005665/a005665_1.pdf">Letter to N. J. A. Sloane, 1976</a>
%H A005666 Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H A005666 Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H A005666 D. G. Poole, <a href="http://www.jstor.org/stable/2690991">The towers and triangles of Professor Claus (or, Pascal knows Hanoi)</a>, Math. Mag., 67 (1994), 323-344.
%H A005666 Amir Sapir, <a href="https://doi.org/10.1093/comjnl/47.1.20">The Tower of Hanoi with Forbidden Moves</a>, The Computer J. 47 (1) (2004) 20, case (ii), cyclic.
%H A005666 <a href="/index/To#Hanoi">Index entries for sequences related to Towers of Hanoi</a>
%H A005666 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-2).
%F A005666 a(n) = (1/(4*s3))*((1+s3)^(n+2)-(1-s3)^(n+2))-1 where s3 = sqrt(3).
%F A005666 a(n) = A028859(n) - 1.
%F A005666 G.f.: x*(2+x) / ( (x-1)*(2*x^2+2*x-1) ). - _Simon Plouffe_ in his 1992 dissertation
%F A005666 From _Paul Zimmermann_, Feb 07 2018: (Start)
%F A005666 a(n) = 2*a(n-1)+2*a(n-2)+3 (same recurrence as A005665).
%F A005666 a(n) = 2*a(n-1)+c(n-1)+2 where c(n) = 2*a(n-1)+1 stands for A005665. (End)
%F A005666 E.g.f.: exp(x)*(3*cosh(sqrt(3)*x) + 2*sqrt(3)*sinh(sqrt(3)*x) - 3)/3. - _Stefano Spezia_, Apr 11 2025
%t A005666 CoefficientList[Series[z (2 + z)/(z - 1)/(2 z^2 + 2 z - 1), {z, 0, 22}], z] (* _Michael De Vlieger_, Sep 02 2015 *)
%t A005666 LinearRecurrence[{3,0,-2},{0,2,7},30] (* _Harvey P. Dale_, Jul 28 2025 *)
%o A005666 (Magma) [Floor((1/(4*Sqrt(3)))*((1+Sqrt(3))^(n+2)-(1-Sqrt(3))^(n+2))-1): n in [0..30]]; // _Vincenzo Librandi_, Sep 03 2015
%Y A005666 Cf. A005665, A052945 (first differences).
%Y A005666 Cf. A338024, A292764, A338089 (4 pegs).
%K A005666 nonn,nice,easy
%O A005666 0,2
%A A005666 _N. J. A. Sloane_
%E A005666 Name clarified by _Paul Zimmermann_, Feb 09 2018
%E A005666 New name based on the name of A338024, A292764, and A338089 by _Jianing Song_, Nov 01 2024