OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8191
MATHEMATICA
Array[Total@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[BitXor[#, Floor[#/2]], 2] &, 88, 0] (* Michael De Vlieger, Apr 27 2018 *)
PROG
(PARI) first(n) = {my(pr = primes(1 + logint(n, 2)), ex = vector(#pr, i, 1), res = vector(n)); res[1] = 0; for(i = 1, n-1, v = valuation(i, 2); res[i + 1] = res[i] + pr[v++] * ex[v]; ex[v]*=-1); res}; \\ David A. Corneth, Apr 18 2018
(PARI)
A003188(n) = bitxor(n, n>>1);
CROSSREFS
KEYWORD
nonn
AUTHOR
David A. Corneth & Antti Karttunen, Apr 18 2018
STATUS
approved