OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001
MATHEMATICA
Table[Last[Function[s, Select[s, # < First[s]^2 &]]@ FactorInteger[n][[All, 1]] /. {} -> {1}], {n, 109}] (* Michael De Vlieger, Mar 24 2017 *)
PROG
(PARI) A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
gpf(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
for(n=1, 150, print1(gpf(n/a(n)), ", ")) \\ Indranil Ghosh, Mar 24 2017, after David A. Corneth
(Python)
from sympy import primefactors
def A(n):
for i in primefactors(n):
if i>min(primefactors(n))**2: return i
return 1
def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n))
def gpf(n): return 1 if n<2 else max(primefactors(n))
print([gpf(n//a(n)) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 24 2017
STATUS
approved