OFFSET
1,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
end proc:
seq(A085392(n), n=1..50) ; # R. J. Mathar, Jun 26 2011
MATHEMATICA
PrimeFactors[n_] := Flatten[ Table[ # [[1]], {1}] & /@ FactorInteger[n]]; f[n_] := Block[{gpd = Divisors[n][[ -2]]}, If[gpd == 1, 1, PrimeFactors[gpd][[ -1]] ]]; Table[ If[n == 1, 1, f[n]], {n, 1, 95}]
Join[{1}, Table[FactorInteger[Divisors[n][[-2]]][[-1, 1]], {n, 2, 120}]] (* Harvey P. Dale, Jul 02 2019 *)
a[n_] := If[CompositeQ[n], FactorInteger[n][[-1, 1]], 1]; Array[a, 100] (* Amiram Eldar, Jun 19 2022 *)
PROG
(Haskell)
a085392 = a006530 . a032742 -- Reinhard Zumkeller, Oct 03 2012
(PARI) gpd(n) = if (n==1, 1, n/factor(n)[1, 1]);
gpf(n) = if (n==1, 1, vecmax(factor(n)[, 1]));
a(n) = gpf(gpd(n)); \\ Michel Marcus, Apr 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v and Reinhard Zumkeller, Jun 26 2003
EXTENSIONS
Definition corrected by N. J. A. Sloane, Jul 02 2019. Also deleted an incorrect comment.
STATUS
approved