OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
EXAMPLE
30*2-1=59, 30*2+1=61; 36*2-1=71, 36*2+1=73;
30*5-1=149, 30*5+1=151; 36*5-1=179, 36*5+1=181; ...
MATHEMATICA
a=30; b=36; Select[Prime[Range[14^4]], PrimeQ[a*#-1]&&PrimeQ[a*#+1]&&PrimeQ[b*#-1]&&PrimeQ[b*#+1]&]
Select[Prime[Range[35000]], AllTrue[Flatten[{30#+{1, -1}, 36#+{1, -1}}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 20 2015 *)
PROG
(Magma) [p: p in PrimesUpTo(1000000)| IsPrime(30*p-1) and IsPrime(30*p+1) and IsPrime(36*p-1) and IsPrime(36*p+1)]; // Vincenzo Librandi, Nov 24 2010
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 15 2008
EXTENSIONS
More terms from Vincenzo Librandi, Apr 01 2010
STATUS
approved