A182420 a(0)=0, a(n) = (a(n-1) XOR n) * n.
0, 1, 6, 15, 44, 205, 1218, 8547, 68440, 615897, 6158910, 67747911, 812974980, 10568674805, 147961447354, 2219421710235, 35510747363504, 603682705179313, 10866288693227382, 206459485171319935, 4129189703426398300, 86712983771954363901
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..449
Programs
-
Mathematica
nxt[{n_,a_}]:={n+1,(n+1)BitXor[a,n+1]}; NestList[nxt,{0,0},30][[;;,2]] (* Harvey P. Dale, Jul 16 2024 *)
-
Python
a=0 for i in range(1,55): print(a, end=', ') a ^= i a *= i
Formula
a(0)=0, a(n) = (a(n-1) XOR n) * n, where XOR is the bitwise exclusive-OR operator.