OFFSET
1,2
COMMENTS
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
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Oct 28 2003
EXTENSIONS
Edited by Don Reble, Nov 15 2005
STATUS
approved