Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A089280
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A089280 Tower of Hanoi game: a(n) = the number of pegs occupied by already-moved disks after move #n. +0
1
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; listen)
OFFSET

1,2

COMMENT

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.

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

Cf. A001511, A035263.

Sequence in context: A059129 A081771 A066856 this_sequence A100661 A088696 A004738

Adjacent sequences: A089277 A089278 A089279 this_sequence A089281 A089282 A089283

KEYWORD

nonn

AUTHOR

Gary W. Adamson (qntmpkt(AT)yahoo.com), Oct 28 2003

EXTENSIONS

Edited by Don Reble (djr(AT)nk.ca), Nov 15 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 24 14:25 EST 2009. Contains 167438 sequences.


AT&T Labs Research