login
A182536
a(0)=0, a(1)=1, a(n)=(a(n-1) XOR a(n-2)) + n.
2
0, 1, 3, 5, 10, 20, 36, 55, 27, 53, 56, 24, 44, 65, 123, 73, 66, 28, 112, 127, 35, 113, 104, 48, 112, 89, 67, 53, 146, 196, 116, 207, 219, 53, 272, 328, 124, 345, 331, 57, 410, 460, 128, 375, 547, 897, 464, 640, 896, 305, 739, 1029, 1818, 852, 1156, 2055, 3259, 1269, 2184, 3256, 1132, 2321, 3515, 1257, 2450, 3516, 1136, 2575
OFFSET
0,3
FORMULA
a(0)=0, a(1)=1, a(n)=(a(n-1) XOR a(n-2)) + n, where XOR is the bitwise exclusive-or operator.
PROG
(Python)
prpr, prev = 0, 1
for n in range(2, 99):
current = (prpr ^ prev) + n
print(prpr, end=', ')
prpr, prev = prev, current
CROSSREFS
Sequence in context: A217925 A018101 A298184 * A158568 A068013 A342762
KEYWORD
nonn,base,easy,changed
AUTHOR
Alex Ratushnyak, May 04 2012
STATUS
approved