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.
%I A339270 #20 Oct 29 2024 12:22:56 %S A339270 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, %T A339270 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, %U A339270 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 %N 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. %C A339270 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}. %C A339270 This sequence is employed in defining insulated primes and highly insulated primes. %H A339270 Robert Israel, <a href="/A339270/b339270.txt">Table of n, a(n) for n = 1..10000</a> %H A339270 Abhimanyu Kumar and Anuraag Saxena, <a href="https://arxiv.org/abs/2011.14210">Insulated primes</a>, arXiv:2011.14210 [math.NT], 2020. See also <a href="https://doi.org/10.7546/nntdm.2024.30.3.602-612">Notes Num. Theor. Disc. Math.</a> (2024) Vol. 30, No. 3, 602-612. %p A339270 f:= p -> min(nextprime(p)-p-1, p-prevprime(p)): f(2):= 0: %p A339270 map(f@ithprime, [$1..100]); # _Robert Israel_, Dec 24 2020 %t A339270 {0}~Join~Array[Min[NextPrime[# + 1] - # - 1, # - NextPrime[# - 1, -1]] &@ Prime@ # &, 91, 2] (* _Michael De Vlieger_, Dec 11 2020 *) %o A339270 (PARI) %o A339270 D(p)={min(nextprime(p+1)-p-1, p-precprime(p-1))} %o A339270 forprime(p=2, 1000, print1(D(p), ", ")) %Y A339270 Cf. A000040, A000720, A339148 (insulated primes), A339188 (highly insulated primes). %Y A339270 Related sequences: A046929. %K A339270 nonn %O A339270 1,4 %A A339270 _Abhimanyu Kumar_, Nov 29 2020