A337223 a(n) is the least number that can be obtained by replacing some cube XXX in the binary expansion of n by X.
0, 1, 2, 3, 4, 5, 6, 1, 2, 9, 10, 11, 12, 13, 2, 3, 4, 5, 18, 19, 20, 21, 22, 5, 6, 25, 26, 27, 4, 5, 6, 7, 8, 9, 10, 11, 36, 37, 38, 9, 10, 41, 2, 43, 44, 45, 10, 11, 12, 13, 50, 51, 52, 53, 54, 13, 8, 9, 10, 11, 12, 13, 14, 3, 4, 17, 18, 19, 20, 21, 22, 17
Offset: 0
Examples
The first terms, in decimal and in binary, are: n a(n) bin(n) bin(a(n)) -- ---- ------ --------- 0 0 0 0 1 1 1 1 2 2 10 10 3 3 11 11 4 4 100 100 5 5 101 101 6 6 110 110 7 1 111 1 8 2 1000 10 9 9 1001 1001 10 10 1010 1010 11 11 1011 1011 12 12 1100 1100 13 13 1101 1101 14 2 1110 10 15 3 1111 11 16 4 10000 100
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8192
- Rémy Sigrist, PARI program for A337223
- Index entries for sequences related to binary expansion of n
Programs
-
PARI
See Links section.
Formula
a(A297405(n)) = n for any n > 0.
Comments