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