A360325 a(n) is the largest divisor of n that has only prime-indexed prime factors.
1, 1, 3, 1, 5, 3, 1, 1, 9, 5, 11, 3, 1, 1, 15, 1, 17, 9, 1, 5, 3, 11, 1, 3, 25, 1, 27, 1, 1, 15, 31, 1, 33, 17, 5, 9, 1, 1, 3, 5, 41, 3, 1, 11, 45, 1, 1, 3, 1, 25, 51, 1, 1, 27, 55, 1, 3, 1, 59, 15, 1, 31, 9, 1, 5, 33, 67, 17, 3, 5, 1, 9, 1, 1, 75, 1, 11, 3, 1
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[p_, e_] := If[PrimeQ[PrimePi[p]], p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
-
PARI
a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(isprime(primepi(f[i, 1])), f[i, 1]^f[i, 2], 1)); }