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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101608 Solution to Tower of Hanoi puzzle encoded in pairs with the moves (1,2),(2,3),(3,1),(2,1),(3,2),(1,3). The disks are moved from peg 1 to 2. For a tower of k disks use the first 2^k-1 number pairs. 3
1, 2, 1, 3, 2, 3, 1, 2, 3, 1, 3, 2, 1, 2, 1, 3, 2, 3, 2, 1, 3, 1, 2, 3, 1, 2, 1, 3, 2, 3, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1, 2, 3, 2, 1, 3, 1, 3, 2, 1, 2, 1, 3, 2, 3, 1, 2, 3, 1, 3, 2, 1, 2, 1, 3, 2, 3, 2, 1, 3, 1, 2, 3, 1, 2, 1, 3, 2, 3, 2, 1, 3, 1, 3, 2, 1, 2, 3, 1, 2, 3, 2, 1, 3, 1, 2, 3, 1, 2, 1, 3, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Recurrence: a(4n+1) = (n mod 3) + 1, a(4n+2) = (n+1 mod 3) + 1, a(4n+3) = f(a(2n+1)), a(4n+4) = f(a(2n+2)), where f(1)=1, f(2)=3, f(3)=2.
EXAMPLE
The solution to the 3-disk puzzle is (1,2),(1,3),(2,3),(1,2),(3,1),(3,2),(1,2), therefore a(1) through a(7) are the same numbers in sequence.
CROSSREFS
Cf. A101607.
If the number of disks is odd see A210243. [Y. Z. Chen, Apr 10 2012]
Sequence in context: A350651 A275832 A237839 * A102853 A304099 A293390
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Dec 09 2004
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)