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!)
A203622 a(n) = (a(n-1) OR a(n-2)) XOR n. 0
0, 1, 3, 0, 7, 2, 1, 4, 13, 4, 7, 12, 3, 2, 13, 0, 29, 12, 15, 28, 11, 10, 29, 8, 5, 20, 15, 4, 19, 10, 5, 16, 53, 20, 23, 52, 19, 18, 53, 16, 29, 52, 23, 28, 51, 18, 29, 48, 13, 12, 63, 12, 11, 58, 13, 8, 53, 4, 15, 52, 3, 10, 53, 0, 117, 52, 55, 116, 51, 50, 117 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Indices of zeros: 2^(2x)-1, e.g. 0, 3, 15, 63, 255.
LINKS
FORMULA
a(0)=0, a(1)=1, a(n) = (a(n-1) OR a(n-2)) XOR n, where OR is the bitwise inclusive-or operator, XOR is the bitwise exclusive-or operator.
PROG
(Python)
prpr = 0
prev = 1
for n in range(2, 77):
current = (prev | prpr) ^ n
print(prpr, end=', ')
prpr = prev
prev = current
CROSSREFS
Cf. A182560.
Sequence in context: A021769 A200119 A291943 * A201571 A010600 A175918
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, May 06 2012
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 8 00:08 EDT 2024. Contains 373206 sequences. (Running on oeis4.)