cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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 *)