OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
11 is a prime, so is (11-1)/2=5 and also 8*11+1=89; 107 is a prime, (107-1)/2=53 and 8*107+1=857, ...
MAPLE
ts_sg8_var_pras := proc(nmax) local i, tren, atek; tren := 0: for i from 1 to nmax do atek := numtheory[safeprime](i): if (atek > tren) then if (isprime(atek)='true' and isprime(6*atek+1)='true') then tren := atek: fi; fi; od; end: seq(ts_sg8_var_pras(i), i=1..3000);
MATHEMATICA
Select[Prime[Range[2000]], AllTrue[{(#-1)/2, 8#+1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 31 2020 *)
PROG
(PARI) forprime(p=3, 20000, if(isprime((p-1)/2), if(isprime(8*p+1), print1(p", "))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jani Melik, Oct 02 2002
EXTENSIONS
More terms from Ralf Stephan, Mar 19 2003
STATUS
approved