%I #14 Oct 01 2021 20:45:12
%S 1,26,118,120,532,1140,1340,1342,1344,15702,15704,19632,19634,31424,
%T 31426,31428,31430,31432,155958,155960,155962,155964,360698,360700,
%U 370310,370312,370314,370316,492170,1349592,1357262,1357264,1357266,2010800,2010802,2010804,2010806
%N Smallest number at distance 2n+1 from nearest prime.
%F a(n) = A051652(2*n+1). - _Sean A. Irvine_, Oct 01 2021
%t seq[max_] := Module[{s = Table[0, {max}], c = 1, n = 4}, s[[1]] = 1; While[c < max, i = (Min[n - NextPrime[n, -1], NextPrime[n] - n] + 1)/2; If[i <= max && s[[i]] == 0, c++; s[[i]] = n]; n += 2]; s] ; seq[20] (* _Amiram Eldar_, Aug 28 2021 *)
%Y Related sequences: A023186-A023188, A046929-A046931, A051650, A051652, A051697-A051702, A051728-A051730.
%K nonn,easy,nice
%O 0,2
%A _N. J. A. Sloane_
%E More terms from _James A. Sellers_, Dec 07 1999
%E More terms from _Amiram Eldar_, Aug 28 2021