OFFSET
0,3
COMMENTS
Terms with indices 6k+1, 6k+2, 6k+3 are odd, all other terms are even.
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
KEYWORD
nonn,base,easy
AUTHOR
Alex Ratushnyak, May 03 2012
STATUS
approved