OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
Select[Range[14000], AllTrue[{#+1, 2#+1, #^2+1}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 27 2019 *)
PROG
(Python)
import sympy
from sympy import isprime
for n in range(100000):
if isprime(n+1) and isprime(n*2+1) and isprime(n*n+1): print str(n)+', ',
(PARI)
s=[]; for(n=1, 15000, if(isprime(n+1)&&isprime(2*n+1)&&isprime(n^2+1), s=concat(s, n))); s \\ Colin Barker, Jan 30 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jan 30 2014
STATUS
approved