login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A351417
Number of divisors of n that are either prime or have at least one square divisor > 1.
1
0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 6, 2, 2, 3, 4, 1, 3, 1, 5, 2, 2, 2, 7, 1, 2, 2, 6, 1, 3, 1, 4, 4, 2, 1, 8, 2, 4, 2, 4, 1, 6, 2, 6, 2, 2, 1, 7, 1, 2, 4, 6, 2, 3, 1, 4, 2, 3, 1, 10, 1, 2, 4, 4, 2, 3, 1, 8, 4, 2, 1, 7, 2, 2, 2, 6, 1, 7, 2, 4, 2, 2, 2
OFFSET
1,4
FORMULA
a(n) = Sum_{d|n} [[Omega(d) = 1] = mu(d)^2], where [ ] is the Iverson bracket.
a(n) = A048105(n) + A001221(n). - Amiram Eldar, Oct 06 2023
EXAMPLE
a(96) = 10; 96 has divisors 2,3 (prime) and 4,8,12,16,24,32,48,96 (all with at least one square divisor > 1).
MATHEMATICA
a[n_] := Module[{e = FactorInteger[n][[;; , 2]], nu}, nu = Length[e]; Times @@ (e+1) - 2^nu + nu]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Oct 06 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n), d = numdiv(f), nu = omega(f)); d - 2^nu + nu; } \\ Amiram Eldar, Oct 06 2023
CROSSREFS
Cf. A001221 (omega), A001222 (Omega, aka bigomega), A008683 (mu), A048105.
Sequence in context: A069157 A294894 A076526 * A226378 A347460 A033273
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 10 2022
STATUS
approved