login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A178068
Primes p such that 2p+1, 3p+2 and 5p-2 are also primes.
1
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,1
COMMENTS
Subsequence of A067256. - R. J. Mathar, May 31 2010
LINKS
EXAMPLE
a(1) = 3 because 3, 2*3+1 = 7, 3*3+2 = 11 and 5*3-2 = 13 are all primes.
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 *)
PROG
(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
(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
(PARI) is(p) = isprime(p) && isprime(2*p+1) && isprime(3*p+2) && isprime(5*p-2); \\ Amiram Eldar, Apr 29 2024
CROSSREFS
Cf. A067256.
Sequence in context: A230080 A155778 A209028 * A018978 A100703 A352691
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, May 19 2010
STATUS
approved