OFFSET
1,4
LINKS
FORMULA
a(n) = Sum_{d|n} [[Omega(d) = 1] = mu(d)^2], where [ ] is the Iverson bracket.
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
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 10 2022
STATUS
approved