OFFSET
1,1
COMMENTS
Subsequence of A067256. - R. J. Mathar, May 31 2010
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
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
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, May 19 2010
STATUS
approved