OFFSET
1,1
COMMENTS
Let p_k be the k-th prime. A prime p is in the sequence iff the interval of the form (2p_k, 2p_(k+1)), containing p, also contains a prime less than p. The sequence is connected with the following classification of primes: the first two primes 2,3 form a separate set of primes; let p >= 5 be in the interval (2p_k, 2p_(k+1)), then 1) if in this interval there are only primes greater than p, then p is called a right prime; 2) if in this interval there are only primes less than p, then p is called a left prime; 3) if in this interval there are primes both greater and less than p, then p is called a central prime; 4) if this interval does not contain other primes, then p is called an isolated prime. In particular, the right primes form sequence A166307, and all Ramanujan primes (A104272) greater than 2 are either right or central primes; the left primes form sequence A182365, and all Labos primes (A080359) greater than 3 are either left or central primes; the central primes form A166252 and the isolated primes form A166251. [Vladimir Shevelev, Oct 10 2009] [Sequence reference updated by Peter Munn, Jun 01 2023]
Disjoint union of A166252 and A182365. - Peter Munn, Jun 01 2023 [an edited version of a contribution by Vladimir Shevelev in 2009]
LINKS
V. Shevelev, On critical small intervals containing primes, arXiv:0908.2319 [math.NT], 2009.
V. Shevelev, Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes, J. Int. Seq. 15 (2012) # 12.5.4
J. Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, arXiv:1105.2249 [math.NT], 2011; J. Integer Seq. 14 (2011) Article 11.6.2.
FORMULA
EXAMPLE
Let p=53. We see that 2*23<53<2*29. Since the interval (46, 58) contains prime 47<53 and does not contain any prime more than 53, then, by the considered classification 53 is left prime and it is in the sequence. [Vladimir Shevelev, Oct 10 2009]
MAPLE
isA164333 := proc(n)
local i ;
if isprime(n) and n > 3 then
for i from (prevprime(n)+1)/2 to (n-1)/2 do
if isprime(i) then
return false;
end if;
end do;
return true;
else
false;
end if;
end proc:
for i from 2 to 700 do
if isA164333(i) then
printf("%d, ", i);
end if;
end do: # R. J. Mathar, Oct 29 2011
MATHEMATICA
kmax = 200; Select[Table[{(Prime[k - 1] + 1)/2, (Prime[k] - 1)/2}, {k, 3, kmax}], AllTrue[Range[#[[1]], #[[2]]], CompositeQ]&][[All, 2]]*2 + 1 (* Jean-François Alcover, Nov 14 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Aug 13 2009
EXTENSIONS
Definition rephrased by R. J. Mathar, Oct 02 2009
STATUS
approved