A182249 a(0)=0, a(n) = (a(n-1) * n) OR n.
0, 1, 2, 7, 28, 141, 846, 5927, 47416, 426745, 4267450, 46941951, 563303420, 7322944461, 102521222462, 1537818336943, 24605093391088, 418286587648497, 7529158577672946, 143054012975785975, 2861080259515719516
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..449
Programs
-
Mathematica
nxt[{n_,a_}]:={n+1,BitOr[a(n+1),n+1]}; Transpose[NestList[nxt,{0,0}, 20]] [[2]] (* Harvey P. Dale, Aug 13 2013 *)
-
Python
a=0 for i in range(1,51): print(a, end=',') a *= i a |= i
Formula
a(0)=0, a(n)=(a(n-1)*n) OR n, where OR is the bitwise logical inclusive-OR operator.