A178068 Primes p such that 2p+1, 3p+2 and 5p-2 are also primes.
3, 5, 23, 89, 173, 233, 239, 1223, 1409, 1559, 2549, 2693, 3389, 3803, 4373, 4919, 9059, 10313, 16493, 17159, 20879, 20939, 22013, 24473, 25229, 31649, 32933, 34253, 34883, 37049, 38453, 39089, 40283, 41399, 43793, 44543, 49103, 49919, 50993, 54293, 55673
Offset: 1
Examples
a(1) = 3 because 3, 2*3+1 = 7, 3*3+2 = 11 and 5*3-2 = 13 are all primes.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A067256.
Programs
-
Magma
[n: n in [0..1000]| IsPrime(n)and IsPrime(2*n+1)and IsPrime(3*n+2) and IsPrime(5*n-2)] // Vincenzo Librandi, Dec 05 2010
-
Maple
q:= p-> andmap(isprime, [p, 2*p+1, 3*p+2, 5*p-2]): select(q, [$2..60000])[]; # Alois P. Heinz, May 11 2023
-
Mathematica
Select[Prime[Range[6000]], And @@ PrimeQ[{2*# + 1, 3*# +2, 5*# - 2}] &] (* Amiram Eldar, Apr 29 2024 *)
-
PARI
is(p) = isprime(p) && isprime(2*p+1) && isprime(3*p+2) && isprime(5*p-2); \\ Amiram Eldar, Apr 29 2024
-
UBASIC
10 N=3:print N:goto 60 20 A=3:S=sqrt(N) 30 B=N/A 40 if int(B)*A=N then 120 50 A=A+2:if A<=S then 30 60 print N:R=N*2+1:O=N*3+2:P=N*5-2 70 'if R=prmdiv(R) then print "r";R; 80 'if O=prmdiv(O) then print "o";O; 90 'if P=prmdiv(P) then print "p";P; 100 if R=prmdiv(R) and O=prmdiv(O) and P=prmdiv(P) then print R;O;P:stop 110 T=T+1:if T>3 then R=0:O=0:P=0:T=0 120 N=N+2:goto 20
Comments