The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A055662 Successive positions in Tower of Hanoi (with three pegs {0,1,2}) where xyz means smallest disk is on peg z, second smallest is on peg y, third smallest on peg x, etc. and leading zeros indicate largest disks are all on peg 0. 8
 0, 1, 21, 22, 122, 120, 110, 111, 2111, 2112, 2102, 2100, 2200, 2201, 2221, 2222, 12222, 12220, 12210, 12211, 12011, 12012, 12002, 12000, 11000, 11001, 11021, 11022, 11122, 11120, 11110, 11111, 211111, 211112, 211102, 211100, 211200 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Optimal for moving an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1. LINKS FORMULA a(n) = Sum_{j=0..floor(log_2(n))} 10^j * (floor((n/2^j + 1)/2)*(-1)^j mod 3). MATHEMATICA a[n_]:=Sum[10^j*(Mod[(-1)^j*Floor[(n/2^j + 1)/2], 3]), {j, 0, Floor[Log2[n]]}]; Array[a, 70, 0] (* Stefano Spezia, Oct 27 2018 *) CROSSREFS Cf. A001511, A055661. Cf. A060572. Sequence in context: A041906 A041904 A041908 * A041910 A041912 A041914 Adjacent sequences: A055659 A055660 A055661 * A055663 A055664 A055665 KEYWORD nonn AUTHOR Henry Bottomley, Jun 06 2000 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 30 11:20 EST 2022. Contains 358441 sequences. (Running on oeis4.)