OFFSET
0,5
COMMENTS
Disks are numbered 0,1,2,... with the smallest numbered 0. Write a(n) in base 2; the powers 2^i appearing therein tells you what disks are on pin 2. Initially infinitely many disks are on pin 0.
The number k appears in this sequence if and only if it appears in A165404.
EXAMPLE
Move 1 moves a disk from pin 1 to pin 2, move 2 moves a disk from pin 1 to pin 3, move 3 moves a disk from pin 2 to pin 3. Since a(3) = 0, there are no disks on pin 2 after 3 moves, and since a(4) = 4, pin 2 contains disk number 2 only.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 18 2026
STATUS
approved
