login
A318440
a(n) = A046645(n) - A007814(n); the 2-adic valuation of A299150.
4
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
OFFSET
1,9
COMMENTS
After two initial terms, all terms are positive.
LINKS
FORMULA
a(n) = A046645(n) - A007814(n).
a(n) = A007814(A299150(n)).
Additive with a(p^e) = (1 + (p mod 2))*e - A000120(e). - Amiram Eldar, Apr 28 2023
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)
A007814(n) = valuation(n, 2);
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
A046645(n) = vecsum(apply(e -> A005187(e), factor(n)[, 2]));
A318440(n) = A046645(n) - A007814(n);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Sep 02 2018
STATUS
approved