OFFSET
0,3
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. 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) = 3, disks 0 and 1 are missing from pin 1 after 3 moves.
The number k appears in this sequence if and only if it is in A295897.
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) = 3, disks 0 and 1 are missing from pin 1 after 3 moves.
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 18 2026
STATUS
approved
