OFFSET
1,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Divisor Function.
Eric Weisstein's World of Mathematics, Perfect Power.
FORMULA
G.f.: Sum_{k=i^j, i>=1, j>=2, excluding duplicates} x^k/(1 - x^k). - Ilya Gutkovskiy, Mar 20 2017
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + A072102 = 1.874464... . - Amiram Eldar, Dec 31 2023
EXAMPLE
Divisors of n=108: {1,2,3,4,6,9,12,18,27,36,54,108},
a(108) = #{1^2, 2^2, 3^2, 3^3, 6^2} = 5.
MATHEMATICA
ppQ[n_] := GCD @@ Last /@ FactorInteger@ n > 1; ppQ[1] = True; f[n_] := Length@ Select[ Divisors@ n, ppQ]; Array[f, 105] (* Robert G. Wilson v, Dec 12 2012 *)
PROG
(Haskell)
a091050 = sum . map a075802 . a027750_row
-- Reinhard Zumkeller, Dec 13 2012
(PARI) a(n) = 1+ sumdiv(n, d, ispower(d)>1); \\ Michel Marcus, Sep 21 2014
(PARI) a(n)={my(f=factor(n)[, 2]); 1 + if(#f, sum(k=2, vecmax(f), moebius(k)*(1 - prod(i=1, #f, 1 + f[i]\k))))} \\ Andrew Howroyd, Aug 30 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 15 2003
EXTENSIONS
Wrong formula deleted by Amiram Eldar, Apr 29 2020
STATUS
approved