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.

Showing 1-2 of 2 results.

A052248 Greatest prime divisor of all composite numbers between p and next prime.

Original entry on oeis.org

2, 3, 5, 3, 7, 3, 11, 13, 5, 17, 19, 7, 23, 17, 29, 5, 31, 23, 3, 37, 41, 43, 47, 11, 17, 53, 3, 37, 61, 43, 67, 23, 73, 5, 31, 79, 83, 43, 89, 5, 61, 3, 97, 11, 103, 109, 113, 19, 29, 79, 5, 83, 127, 131, 89, 5, 137, 139, 47, 97, 151, 103, 13, 157, 163, 167, 173, 29, 13
Offset: 2

Views

Author

Keywords

Comments

Or, largest of all prime factors of the numbers between prime(n) and prime(n+1).
a(n) = 3, 5, 7, 11, 13 iff prime(n) is in A059960, A080185, A080186, A080187, A080188 respectively. This sequence defines a mapping f of primes > 2 to primes (cf. A080189) and f(p) < p holds for all p > 2. - Klaus Brockhaus, Feb 10 2003
a(n) = A006530(A061214(n)). - Reinhard Zumkeller, Jun 22 2011

Examples

			a(8) = 11 since 20 = 2*2*5, 21 = 3*7, 22 = 2*11 are the numbers between prime(8) = 19 and prime(9) = 23.
For n=9, n-th prime is 23, composites between 23 and next prime are 24 25 26 27 29 of which largest prime divisor is 13, so a(9)=13.
		

Crossrefs

Programs

  • Haskell
    a052248 n = a052248_list !! (n-2)
    a052248_list = f a065091_list where
       f (p:ps'@(p':ps)) = (maximum $ map a006530 [p+1..p'-1]) : f ps'
    -- Reinhard Zumkeller, Jun 22 2011
  • Mathematica
    g[n_] := Block[{t = Range[Prime[n] + 1, Prime[n + 1] - 1]}, Max[First /@ Flatten[ FactorInteger@t, 1]]]; Table[ g[n], {n, 2, 72}] (* Robert G. Wilson v, Feb 08 2006 *)
    cmp[{a_,b_}]:=Max[Flatten[FactorInteger/@Range[a+1,b-1],1][[All,1]]]; cmp/@ Partition[ Prime[Range[2,80]],2,1] (* Harvey P. Dale, May 16 2020 *)
  • PARI
    forprime(p=3,360,q=nextprime(p+1); m=0; for(j=p+1,q-1,f=factor(j); a=f[matsize(f)[1],1]; if(m
    				

Formula

a(n) = max(prime(n) < k < prime(n+1), A006530(k)).

A080190 Smallest prime p such that n applications of f lead form p to 2, where f is the mapping of primes > 2 to primes defined by A052248.

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, 2503, 5003, 9973, 19937, 39869, 119617, 239233, 480023, 960031, 1920049, 3840091, 7680181, 15360361, 30720719, 61441379, 122882741, 245765449, 491530873, 983061713, 1966123417
Offset: 0

Views

Author

Klaus Brockhaus, Feb 10 2003

Keywords

Comments

RECORDS transform of A080189; prime p sets a new record for the number of applications of f that are required to reach 2. - a(n) = prime preceding 2*a(n-1) as long as a(n-1) is a term of A080191; if however a(n-1) is a term of A080192, then a(n) > 2*a(n-1). - Next term a(32) > 3932600000, presumably a(32) = 5274863189, a(33) = 10549726367. - The sequence coincides with A006992 (Bertrand primes: a(n) is largest prime < 2*a(n-1)) for the first 17 terms; first divergence occurs after term 39869 because this is the first term which belongs to A080192.

Examples

			f(23) = 13, f(13) = 7, f(7) = 5, f(5) = 3, f(3) = 2; five applications of f are required to reach 2 and for all primes < 23 at most four applications are required, so a(5) = 23.
		

Crossrefs

Formula

f^n(p) = 2.
Showing 1-2 of 2 results.