|
|
A046645
|
|
a(n) = log_2(A046644(n)); also the 2-adic valuation of A046644(n).
|
|
20
|
|
|
0, 1, 1, 3, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 2, 7, 1, 4, 1, 4, 2, 2, 1, 5, 3, 2, 4, 4, 1, 3, 1, 8, 2, 2, 2, 6, 1, 2, 2, 5, 1, 3, 1, 4, 4, 2, 1, 8, 3, 4, 2, 4, 1, 5, 2, 5, 2, 2, 1, 5, 1, 2, 4, 10, 2, 3, 1, 4, 2, 3, 1, 7, 1, 2, 4, 4, 2, 3, 1, 8, 7, 2, 1, 5, 2, 2, 2, 5, 1, 5, 2, 4, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
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)
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; };
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|