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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A161794 Largest prime gap for primes less than (n+1)^2. 1
 1, 2, 4, 4, 6, 6, 6, 6, 8, 8, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 22, 22, 22, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Table of n, a(n) for n=1..73. EXAMPLE For n = 1, the primes less than (n+1)^2 = 4 are 2,3. The only prime gap is 3 - 2 = 1, and this is the first element in the sequence. For n = 2, the primes less than 9 are 2,3,5,7. The prime gaps are {1, 2,2}, of which the largest is 2. This is the second element in the sequence. PROG (PARI) a(n) = my(vp = primes(primepi((n+1)^2))); vecmax(vector(#vp-1, k, vp[k+1] - vp[k])); \\ Michel Marcus, Aug 15 2022 CROSSREFS Cf. A001223, A005250. Sequence in context: A162550 A191682 A113724 * A111650 A156686 A210466 Adjacent sequences: A161791 A161792 A161793 * A161795 A161796 A161797 KEYWORD nonn AUTHOR Daniel Tisdale, Jun 19 2009 EXTENSIONS Edited and extended by Ray Chandler, May 06 2010 STATUS approved

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.

Last modified August 4 17:39 EDT 2024. Contains 374923 sequences. (Running on oeis4.)