login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338324 Primes p such that there exist k and m with p < k < q < m < r such that p + k, q + k, q + m and r + m are all primes, where q and r are the next two primes after p. 1

%I #10 Oct 25 2020 00:01:24

%S 23,29,47,199,523,709,797,809,991,1063,1163,1753,1789,1801,2161,2393,

%T 2477,2549,2693,2917,3469,3491,4363,4423,4691,5039,5051,5081,5743,

%U 6269,6607,7069,7351,7607,7883,8513,9103,9137,9391,9601,9859,10193,10343,10357,11003,11119,11321,11789,11941,13049

%N Primes p such that there exist k and m with p < k < q < m < r such that p + k, q + k, q + m and r + m are all primes, where q and r are the next two primes after p.

%C Members p of A336300 such that the next prime after p is also in A336300.

%H Robert Israel, <a href="/A338324/b338324.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 47 is in the sequence because 47 is prime, the next two primes are 53 and 59, and with k - 50 and m = 54, all of 47+50=97, 53+50=103, 53+54=107 and 59+54=113 are prime.

%p R:= NULL: count:= 0: thisp:= false:

%p q:= 2: r:= 3:

%p while count < 100 do

%p lastp:= thisp; thisp:= false;

%p p:= q; q:= r; r:= nextprime(r);

%p for k from (q+1)/2 to (r-1)/2 do

%p if isprime(q+2*k) and isprime(r+2*k) then

%p thisp:= true; break

%p fi

%p od;

%p if thisp and lastp then R:= R, p; count:= count+1 fi;

%p od:

%p R;

%Y Cf. A336300.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Oct 22 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)