OFFSET
1,36
COMMENTS
The number of exponents in the prime factorization of n that are equal to 2.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
f[p_, e_] := If[e == 2, 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = vecsum(apply(x -> if(x == 2, 1, 0), factor(n)[, 2]));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jan 23 2024
STATUS
approved