VOOZH about

URL: https://oeis.org/A391638

⇱ A391638 - OEIS


login
A391638
Binary encoding of the disks missing from pin 1, after n moves, when moving infinitely many disks in the Tower of Hanoi starting from pin 1, via the optimal algorithm.
2
0, 1, 3, 3, 7, 6, 6, 7, 15, 15, 13, 12, 12, 13, 15, 15, 31, 30, 30, 31, 27, 27, 25, 24, 24, 25, 27, 27, 31, 30, 30, 31, 63, 63, 61, 60, 60, 61, 63, 63, 55, 54, 54, 55, 51, 51, 49, 48, 48, 49, 51, 51, 55, 54, 54, 55, 63, 63, 61, 60, 60, 61, 63, 63, 127, 126
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.
FORMULA
a(n) = A392654(n) + A392655(n).
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