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.

A158712 Primes p such that p1=Floor[p/2]+p is prime and p2=Ceiling[p1/2]+p1 is prime.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

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

Extensions

Definition corrected by Harvey P. Dale, Feb 07 2019