OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
a(462)=6 because 462=2*3*7*11 and so the greatest product of the longest chain including 2 is 2*3=6.
MATHEMATICA
a[1] = 1; a[n_] := Module[{pp}, For[pp = 1; p = FactorInteger[n][[1, 1]], Mod[n, p] == 0, p = NextPrime[p], pp *= p]; pp]; Table[a[n], {n, 1, 90}] (* Jean-François Alcover, Mar 04 2014 *)
PROG
(PARI) A053590(n) = {
local(a) ;
if (n==1,
return(1)
) ;
a = A020639(n) ;
p = nextprime(a+1) ;
while(1,
if ( n % p ==0,
a *= p; p=nextprime(p+1),
return(a)
) ;
) ;
a ;
} /* R. J. Mathar, Mar 02 2012 */
(Haskell)
a053590 1 = 1
a053590 n = last $ takeWhile ((== 0) . (mod n)) $
scanl1 (*) $ dropWhile (< a020639 n) a000040_list
-- Reinhard Zumkeller, May 28 2012
CROSSREFS
KEYWORD
nice,nonn,easy
AUTHOR
Frederick Magata (frederick.magata(AT)uni-muenster.de), Jan 19 2000
EXTENSIONS
Data corrected by Reinhard Zumkeller, May 28 2012
STATUS
approved