|
|
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:
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|