A091050 Number of divisors of n that are perfect powers.
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, 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, 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
Offset: 1
Keywords
Examples
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.
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.
Programs
-
Haskell
a091050 = sum . map a075802 . a027750_row -- Reinhard Zumkeller, Dec 13 2012
-
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 *)
-
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
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
Extensions
Wrong formula deleted by Amiram Eldar, Apr 29 2020
Comments