%I #44 Dec 31 2023 06:23:31
%S 1,1,1,2,1,1,1,3,2,1,1,2,1,1,1,4,1,2,1,2,1,1,1,3,2,1,3,2,1,1,1,5,1,1,
%T 1,4,1,1,1,3,1,1,1,2,2,1,1,4,2,2,1,2,1,3,1,3,1,1,1,2,1,1,2,6,1,1,1,2,
%U 1,1,1,5,1,1,2,2,1,1,1,4,4,1,1,2,1,1,1,3,1,2,1,2,1,1,1,5,1,2,2,4,1,1
%N Number of divisors of n that are perfect powers.
%C Not the same as A005361: a(72)=5 <> A005361(72)=6.
%H Reinhard Zumkeller, <a href="/A091050/b091050.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DivisorFunction.html">Divisor Function</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PerfectPower.html">Perfect Power</a>.
%F a(n) = 1 iff n is squarefree: a(A005117(n)) = 1, a(A013929(n)) > 1.
%F a(p^k) = k for p prime, k>0: a(A000961(n)) = A025474(n).
%F a(n) = Sum_{k=1..A000005(n)} A075802(A027750(n,k)). - _Reinhard Zumkeller_, Dec 13 2012
%F G.f.: Sum_{k=i^j, i>=1, j>=2, excluding duplicates} x^k/(1 - x^k). - _Ilya Gutkovskiy_, Mar 20 2017
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + A072102 = 1.874464... . - _Amiram Eldar_, Dec 31 2023
%e Divisors of n=108: {1,2,3,4,6,9,12,18,27,36,54,108},
%e a(108) = #{1^2, 2^2, 3^2, 3^3, 6^2} = 5.
%t 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 *)
%o (Haskell)
%o a091050 = sum . map a075802 . a027750_row
%o -- _Reinhard Zumkeller_, Dec 13 2012
%o (PARI) a(n) = 1+ sumdiv(n, d, ispower(d)>1); \\ _Michel Marcus_, Sep 21 2014
%o (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
%Y Cf. A000005, A001597, A005361, A072102, A091051.
%K nonn
%O 1,4
%A _Reinhard Zumkeller_, Dec 15 2003
%E Wrong formula deleted by _Amiram Eldar_, Apr 29 2020
|