A381204 a(n) is the gcd of the elements of the set of bases and exponents in the prime factorization of n.
1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2
Examples
a(16) = 2 because 16 = 2^4, the set of these bases and exponents is {2, 4} and gcd(2, 4) = 2. a(19683) = 3 because 19683 = 3^9, the set of these bases and exponents is {3, 9} and gcd(3, 9) = 3.
Links
- Paolo Xausa, Table of n, a(n) for n = 2..10000
Programs
-
Mathematica
A381204[n_] := GCD @@ Flatten[FactorInteger[n]]; Array[A381204, 100 ,2]
-
PARI
a(n) = my(f=factor(n)); gcd(setunion(Set(f[,1]), Set(f[,2]))); \\ Michel Marcus, Feb 18 2025
Comments