The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330955 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 x AND y (where AND denotes the bitwise AND operator). 2

%I #8 Jan 05 2020 12:57:33

%S 0,0,0,1,0,1,0,1,0,1,2,2,2,2,2,3,0,1,2,2,2,2,2,3,0,1,2,3,2,2,2,3,0,1,

%T 2,2,4,4,4,4,4,4,4,5,4,5,4,5,4,4,4,5,4,5,6,6,4,4,6,6,6,6,6,7,0,1,2,2,

%U 4,4,4,4,4,4,4,5,4,5,4,5,4,4,4,5,4,5,6

%N 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 x AND y (where AND denotes the bitwise AND operator).

%H Rémy Sigrist, <a href="/A330955/a330955.txt">C program for A330955</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%e For n = 5:

%e - the binary representation of 5 is "101",

%e - the possible values for (x, y), restricted to x >= y without loss of generality, are:

%e bin(5) x y x AND y

%e ------- - - -------

%e "101" 5 0 0

%e "1/01" 1 1 1

%e "10/1" 2 1 0

%e "1/0/1" 3 0 0

%e - hence a(5) = 1.

%o (C) See Links section.

%Y See A330925 for similar sequences.

%Y Cf. A327188.

%K nonn,base

%O 0,11

%A _Rémy Sigrist_, Jan 04 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 07:10 EDT 2024. Contains 373207 sequences. (Running on oeis4.)