OFFSET
1,4
COMMENTS
A268375 gives numbers n for which a(n) = A289617(n) = A005187(A001222(n)). - Antti Karttunen, Jul 08 2017
LINKS
FORMULA
Additive with a(p^n) = A005187(n). - Antti Karttunen, Jul 08 2017
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = 1.410258867603361890498..., where f(x) = -x + Sum_{k>=0} (2^(k+1)-1)*x^(2^k)/(1+x^(2^k)). - Amiram Eldar, Sep 29 2023
MATHEMATICA
f[p_, e_] := 2*e - DigitCount[2*e, 2, 1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
PROG
(PARI)
A007814(n) = (valuation(n, 2));
A046643perA046644(n) = { my(c=1); if(1==n, c, fordiv(n, d, if((d>1)&&(d<n), c -= (A046643perA046644(d)*A046643perA046644(n/d)))); (c/2)); } \\ After the Maple-program given in A046643.
(PARI)
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
A046645(n) = vecsum(apply(e -> A005187(e), factorint(n)[, 2])); \\ A faster implementation. - Antti Karttunen, Jul 08 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved