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.

A158714 Primes p such that p1 = ceiling(p/2) + p is prime and p2 = floor(p1/2) + p1 is prime.

Original entry on oeis.org

3, 19, 67, 307, 379, 467, 547, 587, 739, 859, 1259, 1699, 1747, 1867, 2027, 2699, 2819, 3259, 3539, 4019, 4507, 5059, 5779, 7547, 8219, 8539, 8747, 8819, 9547, 10067, 10499, 10667, 11939, 13259, 13627, 13859, 14939, 17659, 17707, 17987, 18859
Offset: 1

Views

Author

Keywords

Comments

All a(n) == 3 (mod 8), as this is necessary for p, p1 and p2 to be odd. - Robert Israel, May 11 2014

Examples

			67 is in the sequence because 67, ceiling(67/2) + 67 = 101 and floor(101/2) + 101 = 151 are all primes.
		

Crossrefs

Programs

  • Maple
    N:= 10^5; # to get all entries <= N
    filter:= proc(p)
         local p1,p2;
         if not isprime(p) then return false fi;
         p1:= ceil(p/2)+p;
         if not isprime(p1) then return false fi;
         p2:= floor(p1/2)+p1;
         isprime(p2);
    end proc;
    select(filter,[seq(2*i+1,i=1..floor((N-1)/2)]; # Robert Israel, May 09 2014
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p=Ceiling[p/2]+p],If[PrimeQ[p=Floor[p/2]+p],AppendTo[lst,Prime[n]]]],{n,7!}];lst

Extensions

Definition corrected by Robert Israel, May 09 2014