A372504 Multiplicative with a(p^e) = e if e is a power of 2, and 0 otherwise.
1, 1, 1, 2, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 0, 2, 1, 0, 2, 1, 1, 1, 0, 1, 1, 1, 4, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 0, 1, 0, 1, 1, 1, 2, 1, 1, 2, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = vecprod(apply(x -> if(x == 1 << valuation(x, 2), x, 0), factor(n)[, 2]));
Formula
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} f(1/p) = 1.31285540951965780409..., where f(x) = (1-x) * (1 + Sum_{k>=0} 2^k * x^(2^k)).