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.

A060572 Tower of Hanoi: the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1 is on move n to move disk A001511 from peg A060571 to peg A060572 (here).

This page as a plain text file.
%I A060572 #64 Dec 16 2021 18:40:46
%S A060572 1,2,2,1,0,1,1,2,2,0,0,2,1,2,2,1,0,1,1,0,2,0,0,1,1,2,2,1,0,1,1,2,2,0,
%T A060572 0,2,1,2,2,0,0,1,1,0,2,0,0,2,1,2,2,1,0,1,1,2,2,0,0,2,1,2,2,1,0,1,1,0,
%U A060572 2,0,0,1,1,2,2,1,0,1,1,0,2,0,0,2,1,2,2,0,0,1,1,0,2,0,0,1,1,2,2,1,0,1,1,2,2
%N A060572 Tower of Hanoi: the optimal way to move an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1 is on move n to move disk A001511 from peg A060571 to peg A060572 (here).
%C A060572 If written in a fractal pattern of 4 X 4 squares, skipping the first square, going right then down then right then down, etc.:
%C A060572    X122 1011 ...
%C A060572    1011 0200
%C A060572    2200 1122
%C A060572    2122 1011
%C A060572 a number of patterns become apparent. Most notably the central diagonal going from the X down and to the right, when the 1's and 2's are reversed, gives the sequence A060571. When the same process is applied to A060571, this sequence emerges. - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003
%H A060572 Gary W. Adamson, <a href="/A060572/a060572_1.txt">Comments on A060572</a>
%H A060572 J.-P. Allouche, D. Astoorian, J. Randall, and J. Shallit, <a href="http://www.jstor.org/stable/2974693">Morphisms, squarefree strings, and the Tower of Hanoi puzzle</a>, Amer. Math. Monthly 101 (1994), 651-658.
%H A060572 <a href="/index/To#Hanoi">Index entries for sequences related to Towers of Hanoi</a>
%F A060572 a(n) = A060571(n) - (-1)^A001511(n) mod 3.
%F A060572 If n > 2^A001511(n) then a(n) = a(n-2^A001511(n)) - (-1)^A001511(n) mod 3, otherwise a(k) = -(-1)^A001511(n) mod 3.
%F A060572 a(n) = A001511(n)-th digit from right of A055662(n).
%F A060572 If a(n)=0 then a(2n)=0, If a(n)=1 then a(2n)=2, If a(n)=2 then a(2n)=1, Thus a(n)=a(4n). - Donald Sampson (marsquo(AT)hotmail.com), Dec 01 2003
%F A060572 a(5n) = A060571(n) with the 1's and 2s reversed. - Donald Sampson (marsquo(AT)hotmail.com), Dec 08 2003
%e A060572 Start by moving first disk (from peg 0) to peg 1, second disk (from peg 0) to peg 2, first disk (from peg 1) to peg 2, etc., so sequence starts 1,2,2,...
%o A060572 (PARI) a(n) = (- (-1)^valuation(n,2) - n)%3; \\ _Kevin Ryde_, Aug 07 2021
%Y A060572 Cf. A001511, A055662, A060571, A060573, A060574, A060575.
%K A060572 easy,nonn
%O A060572 1,2
%A A060572 _Henry Bottomley_, Apr 03 2001