%I #48 Jul 22 2024 20:14:10
%S 1,2,3,2,5,6,7,2,3,10,11,12,13,14,15,2,17,18,19,20,21,22,23,24,5,26,3,
%T 28,29,30,31,2,33,34,35,6,37,38,39,40,41,42,43,44,45,46,47,48,7,50,51,
%U 52,53,54,55,56,57,58,59,60,61,62,63,2,65,66,67,68,69,70,71,72,73,74
%N Write n = m^k with m, k integers, k >= 1, then a(n) is the smallest possible choice for m.
%C Value of m in m^p = n, where p is the largest possible power (see A052409).
%C For n > 1, n is a perfect power iff a(n) <> n. - _Reinhard Zumkeller_, Oct 13 2002
%C a(n)^A052409(n) = n. - _Reinhard Zumkeller_, Apr 06 2014
%C Every integer root of n is a power of a(n). All entries (except 1) belong to A007916. - _Gus Wiseman_, Sep 11 2017
%H Daniel Forgues, <a href="/A052410/b052410.txt">Table of n, a(n) for n=1..100000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Power.html">Power</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PerfectPower.html">Perfect Power</a>
%F a(A001597(k)) = A025478(k).
%F a(n) = A007916(A278028(n,1)). - _Gus Wiseman_, Sep 11 2017
%p a:= n-> (l-> (t-> mul(i[1]^(i[2]/t), i=l))(
%p igcd(seq(i[2], i=l))))(ifactors(n)[2]):
%p seq(a(n), n=1..74); # _Alois P. Heinz_, Jul 22 2024
%t Table[If[n==1, 1, n^(1/(GCD@@(Last/@FactorInteger[n])))], {n, 100}]
%o (Haskell)
%o a052410 n = product $ zipWith (^)
%o (a027748_row n) (map (`div` (foldl1 gcd es)) es)
%o where es = a124010_row n
%o -- _Reinhard Zumkeller_, Jul 15 2012
%o (PARI) a(n) = if (ispower(n,,&r), r, n); \\ _Michel Marcus_, Jul 19 2017
%o (Python)
%o def upto(n):
%o list = [1] + [0] * (n - 1)
%o for i in range(2, n + 1):
%o if not list[i - 1]:
%o j = i
%o while j <= n:
%o list[j - 1] = i
%o j *= i
%o return list
%o # _M. Eren Kesim_, Jun 03 2021
%o (Python)
%o from math import gcd
%o from sympy import integer_nthroot, factorint
%o def A052410(n): return integer_nthroot(n,gcd(*factorint(n).values()))[0] if n>1 else 1 # _Chai Wah Wu_, Mar 02 2024
%Y Cf. A001597, A025478, A007916, A027748, A052409, A072775, A124010, A175781, A278028, A288636, A289023.
%K nonn
%O 1,2
%A _Eric W. Weisstein_
%E Definition edited (in a complementary form to A052409) by _Daniel Forgues_, Mar 14 2009
%E Corrected by _Charles R Greathouse IV_, Sep 02 2009
%E Definition edited by _N. J. A. Sloane_, Sep 03 2010