cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Abhimanyu Kumar, Nov 29 2020

Keywords

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.

Crossrefs

Cf. A000040, A000720, A339148 (insulated primes), A339188 (highly insulated primes).
Related sequences: A046929.

Programs

  • 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 *)
  • PARI
    D(p)={min(nextprime(p+1)-p-1, p-precprime(p-1))}
    forprime(p=2, 1000, print1(D(p), ", "))
Showing 1-1 of 1 results.