OFFSET
1,1
COMMENTS
n==2 or 4 (mod 6) so that (n^2+2)/6 is an integer. - Robert Israel, May 03 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
4 is in the sequence because 4^2+1 = 17 and (4^2+2)/6 = 3 are both primes.
MAPLE
select(t -> isprime(t^2+1) and isprime((t^2+2)/6), [seq(seq(6*j+k, k=[2, 4]), j=0..1000)]); # Robert Israel, May 03 2017
MATHEMATICA
Select[Range[3000], PrimeQ[(#^2+1)]&&PrimeQ[(#^2+2)/6]&]
Select[Range[3000], AllTrue[{#^2+1, (#^2+2)/6}, PrimeQ]&] (* Harvey P. Dale, Sep 08 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 10 2012
STATUS
approved