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!)
A327188 For any n >= 0: consider the different ways to split the binary representation of n into two (possibly empty) parts, say with value x and y; a(n) is the greatest possible value of x AND y (where AND denotes the bitwise AND operator). 3
0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 2, 0, 1, 2, 3, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 2, 4, 4, 4, 4, 0, 1, 2, 2, 4, 5, 4, 5, 0, 1, 2, 3, 4, 4, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 2, 4, 4, 4, 4, 0, 1, 2, 2, 4, 4, 4, 4, 0, 1, 2, 2, 4, 5, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
COMMENTS
The first 10000 positive integers where the sequence equals zero match the first 10000 terms of A082662; is that true forever?
LINKS
EXAMPLE
For n=42:
- the binary representation of 42 is "101010",
- there are 7 ways to split it:
- "" and "101010": x=0 and y=42: 0 AND 42 = 0,
- "1" and "01010": x=1 and y=10: 1 AND 10 = 0,
- "10" and "1010": x=2 and y=10: 2 AND 10 = 2,
- "101" and "010": x=5 and y=2: 5 AND 2 = 0,
- "1010" and "10": x=10 and y=2: 10 AND 2 = 2,
- "10101" and "0": x=21 and y=0: 21 AND 0 = 0,
- "101010" and "": x=42 and y=0: 42 AND 0 = 0,
- hence a(42) = 2.
PROG
(PARI) a(n) = my (v=-oo, b=binary(n)); for (w=0, #b, v=max(v, bitand(fromdigits(b[1..w], 2), fromdigits(b[w+1..#b], 2)))); v
CROSSREFS
See A327186 for other variants.
Cf. A082662.
Sequence in context: A363623 A101565 A292944 * A330270 A029341 A240181
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Aug 25 2019
STATUS
approved

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 6 11:03 EDT 2024. Contains 373127 sequences. (Running on oeis4.)