login
A182420
a(0)=0, a(n) = (a(n-1) XOR n) * n.
2
0, 1, 6, 15, 44, 205, 1218, 8547, 68440, 615897, 6158910, 67747911, 812974980, 10568674805, 147961447354, 2219421710235, 35510747363504, 603682705179313, 10866288693227382, 206459485171319935, 4129189703426398300, 86712983771954363901
OFFSET
0,3
LINKS
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
Sequence in context: A137806 A193449 A197160 * A117961 A327769 A318482
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Apr 28 2012
STATUS
approved