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 A339148 #34 Oct 29 2024 12:22:45 %S A339148 7,13,23,37,53,67,89,103,113,131,139,157,173,181,193,211,233,277,293, %T A339148 337,359,389,409,421,449,479,491,509,547,577,607,631,653,691,709,751, %U A339148 761,797,811,823,839,863,887,919,953,983 %N A339148 Insulated primes (see Comments for definition). %C A339148 Let the degree of insulation D(p) for a prime p be defined to be the largest m such that the only prime between p-m and p+m inclusive is p. Then the n-th prime is said to be insulated if and only if D(prime(n)) > D(prime(n+1)) and D(prime(n)) > D(prime(n-1)). %H A339148 Michael De Vlieger, <a href="/A339148/b339148.txt">Table of n, a(n) for n = 1..10000</a> %H A339148 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. %F A339148 a(n) ~ 19.18*n^1.093 (heuristically accurate fit for n up to one million). %F A339148 a(n) ~ c*n^(1+epsilon) (conjectured for some constant c,epsilon as n->oo). %e A339148 For the prime triplet (19,23,29), we have D(19)=2, D(23)=4, and D(29)=1. Hence, 23 is an insulated prime. %t A339148 Select[Prime@ Range[2, 166], And[#2 > #1, #2 > #3] & @@ Map[Min[NextPrime[# + 1] - # - 1, # - NextPrime[# - 1, -1]] &, {NextPrime[# + 1], #, NextPrime[# - 1, -1]}] &] (* _Michael De Vlieger_, Mar 17 2021 *) %o A339148 (PARI) %o A339148 D(p)={min(nextprime(p+1)-p-1, p-precprime(p-1))} %o A339148 ok(p)={my(d=D(p)); d>D(nextprime(p+1)) && d>D(precprime(p-1))} %o A339148 forprime(p=3, 1000, if(ok(p), print1(p, ", "))) \\ _Andrew Howroyd_, Nov 25 2020 %Y A339148 Cf. A000040, A000720. %K A339148 nonn %O A339148 1,1 %A A339148 _Abhimanyu Kumar_, Nov 25 2020