A369428 The number of exponents in the prime factorization of n that are squares.
0, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 0, 2, 0, 1, 1, 3, 1, 0, 2, 2, 2, 0, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 0, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 0, 2, 3, 1, 1, 2, 3, 1, 0, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2, 2, 2
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
a:= n-> add(`if`(issqr(i[2]), 1, 0), i=ifactors(n)[2]): seq(a(n), n=1..100); # Alois P. Heinz, Jan 23 2024
-
Mathematica
f[p_, e_] := If[IntegerQ[Sqrt[e]], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = vecsum(apply(x -> if(issquare(x), 1, 0), factor(n)[, 2]));
Comments