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!)
A352170 Primes p such that p+4, 3*p+4 and 3*p+8 are also prime. 1

%I #13 Mar 09 2022 09:08:17

%S 3,13,103,223,823,2953,7873,11113,11863,13033,13963,16063,22153,23743,

%T 24763,27733,30133,31513,34213,35593,39883,41893,43063,50383,51043,

%U 54493,62983,65323,66343,68473,71593,72643,87793,88423,98893,101203,106363,110563,127873,134593,136603,158563,164623,165703

%N Primes p such that p+4, 3*p+4 and 3*p+8 are also prime.

%C Members p of A023200 such that 3*p+4 is also in A023200.

%C Except for 3, all terms == 13 (mod 30).

%H Martin Ehrenstein, <a href="/A352170/b352170.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = 223 is a term because 223, 223+4 = 227, 3*223+4 = 673 and 3*223+8 = 677 are all prime.

%p select(p -> isprime(p) and isprime(p+4) and isprime(3*p+4) and isprime(3*p+8), [3,seq(i,i=13..10^6,30)]);

%t Select[Range[200000], AllTrue[{#, # + 4, 3*# + 4, 3*# + 8}, PrimeQ] &] (* _Amiram Eldar_, Mar 07 2022 *)

%o (Python)

%o from sympy import sieve, isprime

%o for p in sieve.primerange(0, 10**6):

%o if(all(isprime(q) for q in [p+4, 3*p+4, 3*p+8])):

%o print (p, end=", ") # _Martin Ehrenstein_, Mar 09 2022

%Y Intersection of A023200, A023209 and A023210.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Mar 07 2022

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 August 17 09:50 EDT 2024. Contains 375209 sequences. (Running on oeis4.)