A304817 Number of divisors of n that are either 1 or not a perfect power.
1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 5, 2, 4, 4, 2, 2, 5, 2, 5, 4, 4, 2, 6, 2, 4, 2, 5, 2, 8, 2, 2, 4, 4, 4, 6, 2, 4, 4, 6, 2, 8, 2, 5, 5, 4, 2, 7, 2, 5, 4, 5, 2, 6, 4, 6, 4, 4, 2, 11, 2, 4, 5, 2, 4, 8, 2, 5, 4, 8, 2, 8, 2, 4, 5, 5, 4, 8, 2, 7, 2, 4, 2, 11, 4, 4
Offset: 1
Keywords
Examples
The a(72) = 8 divisors of 72 that are either 1 or not a perfect power are {1, 2, 3, 6, 12, 18, 24, 72}. Missing are {4, 8, 9, 36}.
Crossrefs
Programs
-
Mathematica
Table[DivisorSum[n,Boole[GCD@@FactorInteger[#][[All,2]]==1]&],{n,100}]
-
PARI
a(n) = sumdiv(n, d, !ispower(d)); \\ Michel Marcus, May 19 2018
Formula
a(n) = A183096(n) + 1.
Comments