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!)
A089280 Tower of Hanoi game: a(n) is the number of pegs occupied by already-moved disks after move #n. 0
1, 2, 1, 2, 3, 2, 1, 2, 2, 3, 3, 2, 3, 2, 1, 2, 3, 3, 2, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 2, 1, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 2, 1, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A001511 states the disk number moved on the n-th move.
A035263 indicates the direction of the n-th move (clockwise or not).
REFERENCES
Gary W. Adamson in "Beyond Measure, A Guided Tour Through Nature, Myth and Number" by Jay Kappraff, World Scientific, 2002, Chapter 15, "Number: Gray Code and the Towers of Hanoi", Table 15.1, p. 341-342.
LINKS
FORMULA
Write n in binary; count the length of each span of equal bits. (25 -> 11001 -> 2, 2, 1.) If there is one span, a(n)=1. Otherwise, ignore the first and last spans: a(n)=3 if an odd span-length remains; a(n)=2 if not.
EXAMPLE
a(25)=2 because after 25 moves, 2 pegs have disks (2&3, -, 1&4&5).
CROSSREFS
Sequence in context: A081771 A338170 A066856 * A246960 A285200 A308567
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Oct 28 2003
EXTENSIONS
Edited by Don Reble, Nov 15 2005
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 28 09:37 EDT 2024. Contains 372025 sequences. (Running on oeis4.)