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

A158719
Primes p such that p1 = floor(p/2)+p is not prime and p2 = ceiling(p/2)+p is not prime, p3 = floor(p1/2)+p1 is not prime and p5 = ceiling(p1/2)+p1 is not prime, p4 = floor(p2/2)+p2 is not prime and p6 = ceiling(p2/2)+p2 is not prime.
4
83, 97, 113, 227, 229, 251, 269, 271, 277, 283, 313, 317, 331, 353, 389, 397, 419, 433, 457, 463, 491, 503, 509, 523, 557, 563, 593, 599, 601, 617, 641, 653, 683, 691, 733, 743, 751, 757, 761, 773, 797, 823, 829, 857, 863, 937, 941, 971, 977, 1013, 1031, 1049
OFFSET
1,1
MATHEMATICA
lst={}; Do[p=Prime[n]; If[ !PrimeQ[p1=Floor[p/2]+p]&&!PrimeQ[p2=Ceiling[p/2]+p], If[ !PrimeQ[p3=Floor[p1/2]+p1]&&!PrimeQ[p5=Ceiling[p1/2]+p1], If[ !PrimeQ[p4=Floor[p2/2]+p2]&&!PrimeQ[p6=Ceiling[p2/2]+p2], AppendTo[lst, Prime[n]]]]], {n, 6!}]; lst
nonpQ[p_]:=Module[{p1=Floor[p/2]+p, p2=Ceiling[p/2]+p}, NoneTrue[ {p1, p2, Floor[ p1/2]+p1, Ceiling[p1/2]+p1, Floor[p2/2]+p2, Ceiling[p2/2]+ p2}, PrimeQ]]; Select[Prime[Range[200]], nonpQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 21 2019 *)
KEYWORD
nonn
AUTHOR
STATUS
approved