

A330956


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 greatest possible value of min(x, y).


2



0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 3, 0, 1, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 5, 5, 4, 4, 4, 5, 4, 5, 6, 6, 4, 5, 6, 6, 6, 6, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 6, 7, 7, 7, 4, 5, 6, 7, 6, 7, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,11


LINKS

Table of n, a(n) for n=0..86.
Rémy Sigrist, C program for A330956
Index entries for sequences related to binary expansion of n


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 min(x, y)
   
"101" 5 0 0
"1/01" 1 1 1
"10/1" 2 1 1
"1/0/1" 3 0 0
 hence a(5) = 1.


PROG

(C) See Links section.


CROSSREFS

See A330925 for similar sequences.
Cf. A327193.
Sequence in context: A323275 A139514 A330955 * A190617 A068323 A054990
Adjacent sequences: A330953 A330954 A330955 * A330957 A330958 A330959


KEYWORD

nonn,base


AUTHOR

Rémy Sigrist, Jan 04 2020


STATUS

approved



