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!)
A339270 a(n) is the largest m such that there is no prime except prime(n) from prime(n)-m+1 to prime(n)+m. 1
0, 1, 1, 2, 1, 2, 1, 2, 4, 1, 2, 3, 1, 2, 4, 5, 1, 2, 3, 1, 2, 3, 4, 6, 3, 1, 2, 1, 2, 4, 3, 4, 1, 2, 1, 2, 5, 3, 4, 5, 1, 2, 1, 2, 1, 2, 11, 3, 1, 2, 4, 1, 2, 5, 5, 5, 1, 2, 3, 1, 2, 10, 3, 1, 2, 4, 5, 6, 1, 2, 4, 6, 5, 5, 3, 4, 6, 3, 4, 8, 1, 2, 1, 2, 3, 4, 6, 3, 1, 2, 4, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
For a prime p, the degree of insulation is formally defined as D(p) = Max_{m=1..oo} U where the set U = {m: A000720(p+m) - A000720(p-m) = 1}.
This sequence is employed in defining insulated primes and highly insulated primes.
LINKS
Abhimanyu Kumar and Anuraag Saxena, Insulated primes, arXiv:2011.14210 [math.NT], 2020.
MAPLE
f:= p -> min(nextprime(p)-p-1, p-prevprime(p)): f(2):= 0:
map(f@ithprime, [$1..100]); # Robert Israel, Dec 24 2020
MATHEMATICA
{0}~Join~Array[Min[NextPrime[# + 1] - # - 1, # - NextPrime[# - 1, -1]] &@ Prime@ # &, 91, 2] (* Michael De Vlieger, Dec 11 2020 *)
PROG
(PARI)
D(p)={min(nextprime(p+1)-p-1, p-precprime(p-1))}
forprime(p=2, 1000, print1(D(p), ", "))
CROSSREFS
Cf. A000040, A000720, A339148 (insulated primes), A339188 (highly insulated primes).
Related sequences: A046929.
Sequence in context: A135990 A347256 A347224 * A345226 A140715 A330690
KEYWORD
nonn
AUTHOR
Abhimanyu Kumar, Nov 29 2020
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 21:46 EDT 2024. Contains 374575 sequences. (Running on oeis4.)