OFFSET
1,6
COMMENTS
In the prime factorization of n = p1^e1 * ... pk^ek, add together the number of trailing 1-bits in each exponent e when they are written in binary.
LINKS
FORMULA
Additive with a(p^e) = A007814(1+e).
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) =-0.223720656976344505701..., where f(x) = -x + (1-x) * Sum_{k>=1} x^(2^k-1)/(1-x^(2^k)). - Amiram Eldar, Sep 28 2023
MATHEMATICA
Table[IntegerExponent[DivisorSigma[0, n], 2], {n, 120}] (* Michael De Vlieger, Nov 28 2017 *)
PROG
(Scheme, with memoization-macro definec)
(PARI) a(n) = valuation(numdiv(n), 2); \\ Michel Marcus, Nov 30 2017
(Python)
from sympy import divisor_count
def A295664(n): return (~(m:=int(divisor_count(n))) & m-1).bit_length() # Chai Wah Wu, Jul 05 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Nov 28 2017
STATUS
approved