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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229763 a(n) = (2*n) XOR n AND n, where AND and XOR are bitwise logical operators. 2
0, 1, 2, 1, 4, 5, 2, 1, 8, 9, 10, 9, 4, 5, 2, 1, 16, 17, 18, 17, 20, 21, 18, 17, 8, 9, 10, 9, 4, 5, 2, 1, 32, 33, 34, 33, 36, 37, 34, 33, 40, 41, 42, 41, 36, 37, 34, 33, 16, 17, 18, 17, 20, 21, 18, 17, 8, 9, 10, 9, 4, 5, 2, 1, 64, 65, 66, 65, 68, 69, 66, 65, 72, 73, 74 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..8191

FORMULA

a(n) = ((2*n) XOR n) AND n = ((2*n) AND n) XOR n.

a(2n) = 2a(n), a(2n+1) = A229762(n). - Ralf Stephan, Oct 07 2013

PROG

(Python)

for n in range(333): print (2*n ^ n) & n,

(Haskell)

import Data.Bits ((.&.), xor, shiftL)

a229763 n = (shiftL n 1 `xor` n) .&. n :: 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. A229762 (n XOR floor(n/2) AND floor(n/2)).

Sequence in context: A247503 A292895 A090077 * A163509 A161399 A318479

Adjacent sequences:  A229760 A229761 A229762 * A229764 A229765 A229766

KEYWORD

nonn,base,easy,look

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 16:43 EDT 2020. Contains 334704 sequences. (Running on oeis4.)