|
|
|
|
0, 0, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 2, 3, 1, 3, 1, 2, 2, 1, 1, 2, 3, 1, 4, 2, 1, 2, 1, 3, 2, 1, 2, 4, 1, 1, 2, 2, 1, 2, 1, 2, 4, 1, 1, 4, 3, 3, 2, 2, 1, 4, 2, 2, 2, 1, 1, 3, 1, 1, 4, 4, 2, 2, 1, 2, 2, 2, 1, 4, 1, 1, 4, 2, 2, 2, 1, 4, 7, 1, 1, 3, 2, 1, 2, 2, 1, 4, 2, 2, 2, 1, 2, 4, 1, 3, 4, 4, 1, 2, 1, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,9
|
|
COMMENTS
|
After two initial terms, all terms are positive.
|
|
LINKS
|
|
|
FORMULA
|
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -1 + Sum_{p prime} f(1/p) = 0.410258867603361890498..., where f(x) = -x + Sum_{k>=0} (2^(k+1)-1)*x^(2^k)/(1+x^(2^k)). - Amiram Eldar, Sep 30 2023
|
|
MATHEMATICA
|
f[p_, e_] := (1 + Mod[p, 2])*e - DigitCount[e, 2, 1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
|
|
PROG
|
(PARI)
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|