OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = tau(n) - Sum_{d|n} [rad(d) = Omega(d)*[omega(d) = 1]], where [ ] is the Iverson bracket.
Sum_{k=1..n} a(k) ~ n * (log(n) + c), where c = A147533 - A094289 = -0.1329269215... . Amiram Eldar, Oct 01 2023
EXAMPLE
a(108) = 10; 2 of the 12 divisors of 108 are of the form p^p (p prime), namely 4 = 2^2 and 27 = 3^3; therefore a(108) = 12-2 = 10.
MATHEMATICA
f1[p_, e_] := e + 1; f2[p_, e_] := If[e < p, 0, 1]; a[1] = 1; a[n_] := Times @@ f1 @@@ (f = FactorInteger[n]) - Plus @@ f2 @@@ f; Array[a, 100] (* Amiram Eldar, Oct 01 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n)); vecprod(apply(x -> x+1, f[, 2])) - sum(i = 1, #f~, f[i, 2] >= f[i, 1]); } \\ Amiram Eldar, Oct 01 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Feb 10 2022
STATUS
approved