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!)
A182509 a(0)=0, a(1)=1, a(n)=(a(n-1) XOR n) + a(n-2). 3
0, 1, 3, 1, 8, 14, 16, 37, 61, 89, 144, 244, 392, 633, 1023, 1641, 2680, 4306, 6968, 11261, 18209, 29489, 47688, 77200, 124880, 202073, 326931, 528993, 855952, 1384942, 2240896, 3625869, 5866797, 9492633, 15359464, 24852068, 40211496, 65063537, 105275007 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Terms with indices 6k+1, 6k+2, 6k+3 are odd, all other terms are even.
LINKS
FORMULA
a(0)=0, a(1)=1, a(n)=(a(n-1) XOR n) + a(n-2), where XOR is the bitwise exclusive-or operator.
PROG
(Python)
prpr = 0
prev = 1
for n in range(2, 99):
current = (prev ^ n) + prpr
print prpr,
prpr = prev
prev = current
CROSSREFS
Sequence in context: A131202 A287987 A067955 * A049965 A221736 A077108
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, May 03 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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)