OFFSET
1,2
COMMENTS
a(n) = Max(#{p: p prime and prime(n)-n+k+1<=p<=prime(n)+k}: 0<=k<n).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..5000
EXAMPLE
a(10) = Max{#{23,29,31}, #{29,31}, #{29,31,37}} = 3;
a(12) = Max{#{29,31,37}, #{31,37,41,43}, #{37,41,43,47}} = 4.
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 05 2009
STATUS
approved