login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053590 Product of the longest chain of consecutive primes (starting with A020639(n)) which divides n. 3

%I #22 Apr 25 2016 11:45:28

%S 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 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 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 Product of the longest chain of consecutive primes (starting with A020639(n)) which divides n.

%H Reinhard Zumkeller, <a href="/A053590/b053590.txt">Table of n, a(n) for n = 1..10000</a>

%e 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 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 (PARI) A053590(n) = {

%o local(a) ;

%o if (n==1,

%o return(1)

%o ) ;

%o a = A020639(n) ;

%o p = nextprime(a+1) ;

%o while(1,

%o if ( n % p ==0,

%o a *= p; p=nextprime(p+1),

%o return(a)

%o ) ;

%o ) ;

%o a ;

%o } /* R. J. Mathar, Mar 02 2012 */

%o (Haskell)

%o a053590 1 = 1

%o a053590 n = last $ takeWhile ((== 0) . (mod n)) $

%o scanl1 (*) $ dropWhile (< a020639 n) a000040_list

%o -- _Reinhard Zumkeller_, May 28 2012

%Y Cf. A073485 (fixed points), A192280.

%K nice,nonn,easy

%O 1,2

%A Frederick Magata (frederick.magata(AT)uni-muenster.de), Jan 19 2000

%E Data corrected by _Reinhard Zumkeller_, May 28 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 00:08 EDT 2024. Contains 374377 sequences. (Running on oeis4.)