A381952 a(n) is the greatest common divisor of n and the maximum exponent in the prime factorization of n.
1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1
Offset: 1
Examples
a(1) = gcd(1, A051903(1)) = gcd(1, 0) = 1. a(4) = gcd(4, A051903(4)) = gcd(4, 2) = 2. a(16) = gcd(16, A051903(16)) = gcd(16, 4) = 4.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_] := GCD[n, If[n == 1, 0, Max[FactorInteger[n][[;; , 2]]]]]; Array[a, 100]
-
PARI
a(n) = gcd(n, if(n > 1, vecmax(factor(n)[, 2]), 0));
Comments