OFFSET
1,2
LINKS
FORMULA
EXAMPLE
For n=2: the largest divisor of 2 is 2, and 2 qualifies as divisible by all primes smaller than its largest prime factor, 2 (since there are no smaller primes). So a(2) = 2.
For n=42: of 42's divisors, no multiples of 7 qualify as being divisible by all primes smaller than their largest prime factor (since that factor is 7 and no divisor of 42 is divisible by 5, a smaller prime). The largest of 42's other divisors is 6, which qualifies (since it is divisible by 2, the only prime smaller than 6's largest prime factor, 3). So a(42) = 6.
MATHEMATICA
a[_?OddQ] = 1; a[n_] := Module[{f = FactorInteger[n]}, ind = Position[PrimePi /@ First /@ f - Range @ Length[f], _?(# > 0 &)]; If[ind == {}, n, Times @@ Power @@@ f[[1 ;; ind[[1, 1]] - 1]]]]; Array[a, 100] (* Amiram Eldar, Jan 14 2021 *)
PROG
(PARI) is(n) = my(f=factor(n)[, 1]~); f==primes(#f); \\ A055932
a(n) = vecmax(select(is, divisors(n))); \\ Michel Marcus, Jan 19 2021
(PARI)
A341629(n) = if(1==n, 1, my(f=factor(n)[, 1]~); (primepi(f[#f])==#f));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Munn, Jan 04 2021
STATUS
approved