OFFSET
1,6
COMMENTS
a(n) = smallest positive number k such that n/k is a prime power.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Ilya Gutkovskiy, Extended graphical example
FORMULA
EXAMPLE
a(12) = 3 because 12 = 2^2*3 therefore 12/(largest prime power dividing 12) = 12/4 = 3.
MAPLE
f:= n -> n /max(map(t -> t[1]^t[2], ifactors(n)[2])):
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Apr 09 2017
MATHEMATICA
Join[{1}, Table[n/Last[Select[Divisors[n], PrimePowerQ[#1] &]], {n, 2, 90}]]
PROG
(Python)
from sympy import lcm
def a003418(n): return 1 if n<1 else lcm(range(1, n + 1))
def a(n):
m=1
while True:
if a003418(m)%n==0: return m
else: m+=1
print([n//a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 04 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 30 2017
STATUS
approved