OFFSET
1,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
FORMULA
a(1)=1, then a(n) = (a(n-1) + n) XOR n, where XOR is the bitwise exclusive-OR operator.
MATHEMATICA
Module[{n = 1}, NestList[BitXor[++n, # + n] &, 1, 100]] (* Paolo Xausa, Nov 26 2024 *)
PROG
(Python)
a=1
for n in range(2, 77):
print(a, end=', ')
a = (a+n) ^ n
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Feb 03 2014
STATUS
approved