login
A351418
Number of divisors of n that are either of the form p^k (p prime, k>1) or are nonprime squarefree numbers.
1
1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 5, 1, 5, 2, 2, 2, 4, 1, 2, 2, 4, 1, 5, 1, 3, 3, 2, 1, 5, 2, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 6, 1, 2, 3, 6, 2, 5, 1, 3, 2, 5, 1, 5, 1, 2, 3, 3, 2, 5, 1, 5, 4, 2, 1, 6, 2, 2, 2, 4, 1, 6, 2, 3, 2, 2, 2
OFFSET
1,4
FORMULA
a(n) = Sum_{d|n} [[omega(d) = 1] = (1-mu(d)^2)], where [ ] is the Iverson bracket.
a(n) = A034444(n) - 2*A001221(n) + A001222(n). - Amiram Eldar, Oct 06 2023
EXAMPLE
a(60) = 6; 30 has the divisors 1,6,10,15,30 (nonprime squarefree numbers), and 4 = 2^2 (which is of the form p^k, k>1).
MATHEMATICA
a[n_] := Module[{e = FactorInteger[n][[;; , 2]], nu}, nu = Length[e]; 2^nu - 2*nu + Total[e]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Oct 06 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n), nu = omega(f), om = bigomega(f)); 2^nu - 2*nu + om; } \\ Amiram Eldar, Oct 06 2023
CROSSREFS
Cf. A001221 (omega), A001222 (bigomega), A008683 (mu), A034444.
Sequence in context: A086436 A001222 A257091 * A359909 A319269 A320888
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 10 2022
STATUS
approved