OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..449
FORMULA
a(0)=0, a(n) = (a(n-1) XOR n) * n, where XOR is the bitwise exclusive-OR operator.
MATHEMATICA
nxt[{n_, a_}]:={n+1, (n+1)BitXor[a, n+1]}; NestList[nxt, {0, 0}, 30][[;; , 2]] (* Harvey P. Dale, Jul 16 2024 *)
PROG
(Python)
a=0
for i in range(1, 55):
. print a,
. a ^= i
. a *= i
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Apr 28 2012
STATUS
approved