Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #25 Oct 29 2024 12:22:50
%S 2,5,23,53,409,293,211,1847,3137,2179,3967,23719,16033,40387,44417,
%T 24281,158699,220973,172933,321509,38501,58831,203713,268343,206699,
%U 829399,824339,413353,2280767,2305549,3253631,1272749,2401807,2844833,3021241
%N Lonely (or isolated) primes: least prime of distance n from nearest prime (n = 1 or even).
%C a(1)=least prime of distance 1 from nearest prime.
%C if n>1 a(n)=least prime of distance 2n-2 from nearest prime.
%H Giovanni Resta, <a href="/A023188/b023188.txt">Table of n, a(n) for n = 1..191</a> (first 65 terms from Daniel Lignon)
%H Abhimanyu Kumar and Anuraag Saxena, <a href="https://arxiv.org/abs/2011.14210">Insulated primes</a>, arXiv:2011.14210 [math.NT], 2020. Mentions this sequence. 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.
%t NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {35}]; p = 2; q = 3; k = 1; Do[r = NextPrim[q]; m = Min[r - q, q - p]/2; If[m < 35 && a[[m]] == 0, a[[m]] = q]; p = q; q = r, {n, 1, 235000}]
%t Join[{2},Transpose[Flatten[Table[Select[Partition[Prime[ Range[ 1000000]],3,1], Min[ Differences[#]] == 2n&,1],{n,40}],1]][[2]]](* _Harvey P. Dale_, Nov 17 2013 *)
%Y Related sequences: A023186-A023188, A046929-A046931, A051650, A051652, A051697-A051702, A051728-A051730.
%K nonn
%O 1,1
%A _David W. Wilson_
%E a(36)-a(65) from _Daniel Lignon_, Aug 07 2015