OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
EXAMPLE
20*20 + 20 - 1 = 419, 419 and 421 twin primes, 20 is the 7th of the sequence
MATHEMATICA
Select[Range[500], PrimeQ[ #^2+#-1] && PrimeQ[ #^2+#+1] &] (* T. D. Noe, Jun 22 2004 *)
Select[Range[1000], AllTrue[#^2+#+{1, -1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 12 2017 *)
PROG
(PARI) for(n=1, 10^3, if(isprime(n^2+n-1)&&isprime(n^2+n+1), print1(n, ", "))) \\ Derek Orr, Dec 24 2015
(Magma) [n: n in [1..2*10^3] |IsPrime(n^2+n-1) and IsPrime(n^2+n+1)]; // Vincenzo Librandi, Dec 26 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Pierre CAMI, Nov 09 2003
EXTENSIONS
Corrected description from T. D. Noe, Jun 22 2004
STATUS
approved