cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A053590 Product of the longest chain of consecutive primes (starting with A020639(n)) which divides n.

This page as a plain text file.
%I A053590 #22 Apr 25 2016 11:45:28
%S A053590 1,2,3,2,5,6,7,2,3,2,11,6,13,2,15,2,17,6,19,2,3,2,23,6,5,2,3,2,29,30,
%T A053590 31,2,3,2,35,6,37,2,3,2,41,6,43,2,15,2,47,6,7,2,3,2,53,6,5,2,3,2,59,
%U A053590 30,61,2,3,2,5,6,67,2,3,2,71,6,73,2,15,2,77,6,79,2,3,2,83,6,5,2,3,2,89,30
%N A053590 Product of the longest chain of consecutive primes (starting with A020639(n)) which divides n.
%H A053590 Reinhard Zumkeller, <a href="/A053590/b053590.txt">Table of n, a(n) for n = 1..10000</a>
%e A053590 a(462)=6 because 462=2*3*7*11 and so the greatest product of the longest chain including 2 is 2*3=6.
%t A053590 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 *)
%o A053590 (PARI) A053590(n) = {
%o A053590     local(a) ;
%o A053590     if (n==1,
%o A053590         return(1)
%o A053590     ) ;
%o A053590     a = A020639(n) ;
%o A053590     p = nextprime(a+1) ;
%o A053590     while(1,
%o A053590         if ( n % p ==0,
%o A053590             a *= p; p=nextprime(p+1),
%o A053590             return(a)
%o A053590         ) ;
%o A053590     ) ;
%o A053590     a ;
%o A053590 }  /* R. J. Mathar, Mar 02 2012 */
%o A053590 (Haskell)
%o A053590 a053590 1 = 1
%o A053590 a053590 n = last $ takeWhile ((== 0) . (mod n)) $
%o A053590                    scanl1 (*) $ dropWhile (< a020639 n) a000040_list
%o A053590 -- _Reinhard Zumkeller_, May 28 2012
%Y A053590 Cf. A073485 (fixed points), A192280.
%K A053590 nice,nonn,easy
%O A053590 1,2
%A A053590 Frederick Magata (frederick.magata(AT)uni-muenster.de), Jan 19 2000
%E A053590 Data corrected by _Reinhard Zumkeller_, May 28 2012