The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A229762 a(n) = (n XOR floor(n/2)) AND floor(n/2), where AND and XOR are bitwise logical operators. 2
 0, 0, 1, 0, 2, 2, 1, 0, 4, 4, 5, 4, 2, 2, 1, 0, 8, 8, 9, 8, 10, 10, 9, 8, 4, 4, 5, 4, 2, 2, 1, 0, 16, 16, 17, 16, 18, 18, 17, 16, 20, 20, 21, 20, 18, 18, 17, 16, 8, 8, 9, 8, 10, 10, 9, 8, 4, 4, 5, 4, 2, 2, 1, 0, 32, 32, 33, 32, 34, 34, 33, 32, 36, 36, 37, 36, 34, 34, 33 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 0..8191 FORMULA a(n) = (n XOR floor(n/2)) AND floor(n/2) = (n AND floor(n/2)) XOR floor(n/2). PROG (Python) for n in range(333): print (n ^ (n>>1)) & (n>>1), (Haskell) import Data.Bits ((.&.), xor, shiftR) a229762 n = (n `xor` shiftR n 1) .&. shiftR n 1 :: Int -- Reinhard Zumkeller, Oct 10 2013 CROSSREFS Cf. A003188 (n XOR floor(n/2)). Cf. A048724 (n XOR (n*2)). Cf. A048735 (n AND floor(n/2)). Cf. A213370 (n AND (n*2)). Cf. A213064 (n XOR (n*2) AND (n*2)). Cf. A229763 ((2*n) XOR n AND n). Sequence in context: A116389 A216344 A332011 * A062110 A122896 A191348 Adjacent sequences:  A229759 A229760 A229761 * A229763 A229764 A229765 KEYWORD nonn,base,easy AUTHOR Alex Ratushnyak, Sep 28 2013 STATUS approved

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

Last modified June 2 07:15 EDT 2020. Contains 334767 sequences. (Running on oeis4.)