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!)
A334076 a(n) = bitwise NOR of n and 2n. 1
0, 0, 1, 0, 3, 0, 1, 0, 7, 4, 1, 0, 3, 0, 1, 0, 15, 12, 9, 8, 3, 0, 1, 0, 7, 4, 1, 0, 3, 0, 1, 0, 31, 28, 25, 24, 19, 16, 17, 16, 7, 4, 1, 0, 3, 0, 1, 0, 15, 12, 9, 8, 3, 0, 1, 0, 7, 4, 1, 0, 3, 0, 1, 0, 63, 60, 57, 56, 51, 48, 49, 48, 39, 36, 33, 32, 35, 32, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Exactly all bits that are 0 in both parameters (but not a leading 0 of both) are set to 1 in the output of bitwise NOR.
LINKS
FORMULA
a(n) = 0 <=> n in { A247648 } union { 0 }.
a(n) = n-1 <=> n in { A000079 }.
a(n) = n/2 <=> n in { A125835 }.
a(n) = n*3/4 <=> n in { A141032 }.
MAPLE
a:= n-> Bits[Nor](n, 2*n):
seq(a(n), n=0..127);
PROG
(Python)
def A334076(n):
m = n|(2*n)
return 0 if n == 0 else 2**(len(bin(m))-2)-1-m # Chai Wah Wu, Apr 14 2020
(PARI) a(n) = my(x=bitor(n, 2*n)); bitneg(x, #binary(x)); \\ Michel Marcus, Apr 14 2020
CROSSREFS
Sequence in context: A244454 A238123 A128311 * A132884 A319234 A210473
KEYWORD
nonn,look,base
AUTHOR
Alois P. Heinz, Apr 13 2020
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 April 25 12:53 EDT 2024. Contains 371969 sequences. (Running on oeis4.)