OFFSET
1,2
COMMENTS
The divisor d=1 is counted here as being free of prime divisors and also unitary.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
n=11: 11! = 2*2*2*2*2*2*2*2*3*3*3*3*5*5*7*11, has 540 divisors, 32 are unitary and 32 are squarefree. Only 4 divisors, {1,7,11,77} have both properties, so a(11)=4.
MATHEMATICA
rad[n_] := Times @@ First /@ FactorInteger[n]; p[n_] := Denominator[n/rad[n]^2]; a[n_] := DivisorSigma[0, p[n!]]; Array[a, 70] (* Amiram Eldar, Sep 22 2019 *)
PROG
(PARI) a(n) = my(f=n!); sumdiv(f, d, issquarefree(d) && (gcd(d, f/d) == 1)); \\ Michel Marcus, Sep 05 2017
(PARI) a(n) = 1 << (primepi(n) - primepi(n>>1)); \\ Kevin Ryde, Jun 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Aug 10 2000
STATUS
approved