OFFSET
2,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 2..1000
FORMULA
a(p) = p, a(p^2) = p^p and a(p^m) = p^(p^(m-1)) for prime p. - Chai Wah Wu, Jul 29 2016
EXAMPLE
For n = 12 = 2^2*3, the smallest prime factor of n is f = 2, so a(12) = f^(n/f) = 2^(12/2) = 2^6 = 64. - Michael B. Porter, Jul 31 2016
MAPLE
a:= n-> (f-> f^(n/f))(min(numtheory[factorset](n))):
seq(a(n), n=2..50); # Alois P. Heinz, Dec 11 2017
MATHEMATICA
a[n_] := With[{f = FactorInteger[n][[1, 1]]}, f^(n/f)]; ; Array[a, 50, 2] (* JungHwan Min, Jul 29 2016 *)(* amended by Harvey P. Dale, Aug 12 2021 *)
PROG
(Python)
from __future__ import division
from sympy import primefactors
def A275465(n):
p = min(primefactors(n))
return p**(n//p) # Chai Wah Wu, Jul 29 2016
(PARI) a(n) = my(f=factor(n)[1, 1]); f^(n/f) \\ Felix Fröhlich, Jul 30 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tyler Skywalker, Jul 28 2016
EXTENSIONS
More terms from Chai Wah Wu, Jul 30 2016
STATUS
approved