A178638 a(n) is the number of divisors d of n such that d^k is not equal to n for any k >= 1.
0, 1, 1, 1, 1, 3, 1, 2, 1, 3, 1, 5, 1, 3, 3, 2, 1, 5, 1, 5, 3, 3, 1, 7, 1, 3, 2, 5, 1, 7, 1, 4, 3, 3, 3, 7, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 1, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 11, 1, 3, 5, 3, 3, 7, 1, 5, 3, 7, 1, 11, 1, 3, 5, 5, 3, 7, 1, 9, 2, 3, 1, 11, 3, 3, 3, 7, 1, 11, 3, 5, 3, 3, 3, 11, 1, 5, 5, 7
Offset: 1
Keywords
Examples
For n = 16, set of such divisors is {1, 8}; a(16) = 2.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[DivisorSum[n, 1 &, If[# > 1, #^IntegerExponent[n, #], 1] != n &], {n, 100}] (* Michael De Vlieger, May 27 2017 *)
-
PARI
A286561(n,k) = if(1==k, 1, valuation(n, k)); A178638(n) = sumdiv(n,d,if((d^A286561(n,d))<>n,1,0)); \\ Antti Karttunen, May 26 - 27 2017
-
PARI
a(n) = if(n==1, return(0)); my(f=factor(n), g = f[1, 2]); for(i=2, matsize(f)[1], g=gcd(g, f[i, 2])); numdiv(n) - numdiv(g) \\ David A. Corneth, May 27 2017