login
A295883
Number of exponents that are 3 in the prime factorization of n.
14
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1,216
FORMULA
Additive with a(p^3) = 1, a(p^e) = 0 when e <> 3.
a(n) = A295659(n) - A295884(n).
a(n) <= A295662(n) <= A295663(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} (1/p^3 - 1/p^4) = A085541 - A085964 = 0.0977694995... . - Amiram Eldar, Jul 25 2022
EXAMPLE
For n = 8 = 2^3, there is one exponent that is exactly 3, thus a(8) = 1.
For n = 216 = 2^3 * 3^3 there are two exponents that are exactly 3, thus a(216) = 2.
For n = 432 = 2^4 * 3^3, there is one exponent that is exactly 3, thus a(432) = 1.
MATHEMATICA
Array[Total@ Map[Boole[# == 3] &, FactorInteger[#][[All, -1]]] &, 120] (* Michael De Vlieger, Nov 29 2017 *)
Count[FactorInteger[#][[All, 2]], 3]&/@Range[120] (* Harvey P. Dale, Apr 13 2019 *)
PROG
(Scheme) ;; With memoization-macro definec.
(definec (A295883 n) (if (= 1 n) 0 (+ (if (= 3 (A067029 n)) 1 0) (A295883 (A028234 n)))))
(PARI) a(n) = vecsum(apply(x->(x==3), factor(n)[, 2])); \\ Michel Marcus, Jul 25 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 29 2017
STATUS
approved