OFFSET
1,2
COMMENTS
If n is in A008578, a(n) = n. - Indranil Ghosh, May 16 2017
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
EXAMPLE
The prime factorization of 24 is 2^3 * 3^1. The exponents are 3 and 1. The positive divisors of 24 are 1,2,3,4,6,8,12,24. Therefore since only the divisors 1 and 3 occur among the exponents in the prime factorization of 24, then a(24) = 2 is the smallest divisor not occurring among those exponents.
The prime factorization of 40 is 2^3 * 5^1. The exponents are 3 and 1. The positive divisors of 40 are 1,2,4,5,8,10,20,40. Therefore since only the divisor 1 occurs among the exponents in the prime factorization of 40, then a(40) = 2 is the smallest divisor not occurring among those exponents.
MATHEMATICA
Table[Min[Complement[Divisors[n], Table[FactorInteger[n][[i, 2]], {i, 1, Length[FactorInteger[n]]}]]], {n, 1, 80}] (* Stefan Steinerberger, Aug 30 2008 *)
PROG
(Python)
from sympy import divisors, factorint
def a(n):
f=factorint(n)
l=[f[i] for i in f]
return min(i for i in divisors(n) if i not in l)
print([a(n) for n in range(1, 97)]) # Indranil Ghosh, May 16 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 13 2008
EXTENSIONS
Corrected and extended by Stefan Steinerberger, Aug 30 2008
STATUS
approved