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!)
A154099 Maximal number of primes in intervals of size n containing the n-th prime. 1

%I #10 Nov 12 2023 06:30:36

%S 1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,7,7,7,7,7,7,

%T 8,8,8,9,9,9,9,9,10,10,10,10,9,10,11,11,11,11,11,11,12,12,13,13,13,13,

%U 14,12,12,12,12,12,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,15,15

%N Maximal number of primes in intervals of size n containing the n-th prime.

%C a(n) = Max(#{p: p prime and prime(n)-n+k+1<=p<=prime(n)+k}: 0<=k<n).

%H Reinhard Zumkeller, <a href="/A154099/b154099.txt">Table of n, a(n) for n = 1..5000</a>

%e a(10) = Max{#{23,29,31}, #{29,31}, #{29,31,37}} = 3;

%e a(12) = Max{#{29,31,37}, #{31,37,41,43}, #{37,41,43,47}} = 4.

%o (PARI) a(n) = my(p=prime(n)); vecmax(vector(n, k, #select(isprime, vector(n, i, prime(n)+k-n+i-1)))); \\ _Michel Marcus_, Nov 12 2023

%Y Cf. A097935, A000720.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jan 05 2009

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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)