%I #17 Feb 07 2021 07:02:56
%S 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,
%T 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,
%U 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
%N Tower of Hanoi game: a(n) is the number of pegs occupied by already-moved disks after move #n.
%C A001511 states the disk number moved on the n-th move.
%C A035263 indicates the direction of the n-th move (clockwise or not).
%D 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.
%H <a href="/index/To#Hanoi">Index entries for sequences related to Towers of Hanoi</a>
%F 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.
%e a(25)=2 because after 25 moves, 2 pegs have disks (2&3, -, 1&4&5).
%Y Cf. A001511, A035263.
%K nonn
%O 1,2
%A _Gary W. Adamson_, Oct 28 2003
%E Edited by _Don Reble_, Nov 15 2005