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
Alois P. Heinz, Table of n, a(n) for n = 0..32767
Wikipedia, Bitwise operation
FORMULA
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
KEYWORD
AUTHOR
Alois P. Heinz, Apr 13 2020
STATUS
approved