VOOZH about

URL: https://oeis.org/A330958

⇱ A330958 - OEIS


login
A330958
For any n >= 0: consider all pairs of numbers (x, y) whose binary representations can be interleaved (or shuffled) to produce the binary representation of n (possibly with leading zeros); a(n) is the least possible value of x OR y (where OR denotes the bitwise OR operator).
2
0, 1, 1, 1, 1, 1, 3, 3, 1, 1, 2, 3, 2, 3, 3, 3, 1, 1, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 6, 7, 7, 7, 1, 1, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7, 7, 3, 3, 3, 3, 5, 5, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 1, 1, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7, 7, 3, 3, 3, 3, 5, 5, 6
OFFSET
0,7
EXAMPLE
For n = 5:
- the binary representation of 5 is "101",
- the possible values for (x, y), restricted to x >= y without loss of generality, are:
bin(5) x y x OR y
------- - - ------
"101" 5 0 5
"1/01" 1 1 1
"10/1" 2 1 3
"1/0/1" 3 0 3
- hence a(5) = 1.
PROG
(C) See Links section.
CROSSREFS
See A330925 for similar sequences.
Cf. A327186.
Sequence in context: A152141 A098505 A178395 * A327186 A021306 A214281
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 04 2020
STATUS
approved