S000470


Alternating sum of the number of distinct prime factors of the numbers up to 2^n.

0, 1, 1, 2, 4, 11, 20, 44, 91, 193, 397, 818, 1669, 3408, 6916, 14008, 28335, 57244, 115456, 232686, 468488, 942613, 1895481, 3809502, 7652864, 15367784, 30849466, 61909089, 124207265, 249136274, 499615154

0

S000470

T. D. Noe, Plot of terms 1..30

(Mma) t = {0}; s = 0; nxt = 2; Do[s = s + Length[FactorInteger[n]] (-1)^n; If[n == nxt, AppendTo[t, s]; nxt = 2*nxt], {n, 2, 2^16}]; t

Cf. S000468.

nonn

T. D. Noe, Feb 09 2015

© Tony D Noe 2014-2015