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.

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

This page as a plain text file.
%I A242366 #14 Apr 27 2019 05:21:36
%S A242366 2,3,11,59,131,179,347,1259,1571,1979,2027,2411,2699,2819,3251,3347,
%T A242366 4211,5051,5099,5171,5531,6779,7187,8747,10091,12227,13259,13451,
%U A242366 13499,13931,14411,14771,15131,15467,16451,16691,17987,18131,18539,18731,18899,19211
%N A242366 Primes p such that p1 = ceiling(p/2) + p is prime and p2 = floor(p1/2) + p is prime.
%C A242366 All terms after 2 are congruent to 3 mod 8, as this is needed for p, p1 and p2 to be odd.  If p = 3 + 8*k, then p1 = 5 + 12*k and p2 = 5 + 14*k.
%H A242366 Robert Israel, <a href="/A242366/b242366.txt">Table of n, a(n) for n = 1..10000</a>
%e A242366 11 is in the sequence since 11, ceiling(11/2) + 11 = 17 and floor(17/2) + 11 = 19 are all primes.
%p A242366 N:= 100000: # to get all terms <= N
%p A242366 filter:= proc(p) local p1, p2;
%p A242366 if not isprime(p) then return false fi;
%p A242366 p1:= ceil(p/2)+p;
%p A242366 if not isprime(p1) then return false fi;
%p A242366 p2:= floor(p1/2)+p;
%p A242366 isprime(p2);
%p A242366 end;
%p A242366 select(filter,[2, seq(3+8*k, k=0 .. floor((N-3)/8))]);
%t A242366 M = 100000;
%t A242366 filterQ[p_] := Module[{p1, p2},
%t A242366 If[!PrimeQ[p], Return[False]];
%t A242366 p1 = Ceiling[p/2] + p;
%t A242366 If[!PrimeQ[p1], Return[False]];
%t A242366 p2 = Floor[p1/2] + p;
%t A242366 PrimeQ[p2]];
%t A242366 Select[Join[{2}, Table[3+8*k, {k, 0, Floor[(M-3)/8]}]], filterQ] (* _Jean-François Alcover_, Apr 27 2019, from Maple *)
%Y A242366 Cf. A158714.
%K A242366 nonn
%O A242366 1,1
%A A242366 _Robert Israel_ and _Vladimir Joseph Stephan Orlovsky_, May 11 2014