A052409 a(n) = largest integer power m for which a representation of the form n = k^m exists (for some k).
0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 1
Keywords
Examples
n = 72 = 2*2*2*3*3: GCD[exponents] = GCD[3,2] = 1. This is the least n for which a(n) <> A051904(n), the minimum of exponents. For n = 10800 = 2^4 * 3^3 * 5^2, GCD[4,3,2] = 1, thus a(10800) = 1.
Links
- Daniel Forgues, Table of n, a(n) for n = 1..100000
- N. J. A. Sloane, Maple programs for A007916, A278028, A278029, A052409, A089723, A277564
- Eric Weisstein's World of Mathematics, Power
- Eric Weisstein's World of Mathematics, Perfect Power
- Index entries for sequences computed from exponents in factorization of n
Crossrefs
Apart from the initial term essentially the same as A253641.
Programs
-
Haskell
a052409 1 = 0 a052409 n = foldr1 gcd $ a124010_row n -- Reinhard Zumkeller, May 26 2012
-
Maple
# See link. # a:= n-> igcd(map(i-> i[2], ifactors(n)[2])[]): seq(a(n), n=1..120); # Alois P. Heinz, Oct 20 2019
-
Mathematica
Table[GCD @@ Last /@ FactorInteger[n], {n, 100}] (* Ray Chandler, Jan 24 2006 *)
-
PARI
a(n)=my(k=ispower(n)); if(k, k, n>1) \\ Charles R Greathouse IV, Oct 30 2012
-
Python
from math import gcd from sympy import factorint def A052409(n): return gcd(*factorint(n).values()) # Chai Wah Wu, Aug 31 2022
-
Scheme
(define (A052409 n) (if (= 1 n) 0 (gcd (A067029 n) (A052409 (A028234 n))))) ;; Antti Karttunen, Aug 07 2017
Formula
Extensions
More terms from Labos Elemer, Jun 17 2002
Comments