login

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”).

A158712
Primes p such that p1=Floor[p/2]+p is prime and p2=Ceiling[p1/2]+p1 is prime.
7
2, 5, 13, 101, 293, 421, 541, 661, 821, 1021, 1301, 1493, 2621, 3221, 3373, 3853, 5693, 5981, 6133, 6421, 6733, 7853, 8861, 8941, 9173, 9221, 9341, 9901, 10061, 10093, 10181, 10613, 15373, 16061, 16333, 16381, 16421, 17093, 18061, 18493, 19141
OFFSET
1,1
MATHEMATICA
lst={}; Do[p=Prime[n]; If[PrimeQ[p=Floor[p/2]+p], If[PrimeQ[p=Ceiling[p/2]+p], AppendTo[lst, Prime[n]]]], {n, 7!}]; lst
pQ[n_]:=Module[{p1=Floor[n/2]+n}, AllTrue[{p1, Ceiling[p1/2]+p1}, PrimeQ]]; Select[Prime[Range[2500]], pQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 07 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition corrected by Harvey P. Dale, Feb 07 2019
STATUS
approved