OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 11 is prime: 13 is next prime. 11^2 - 13 + 1 = 109 which is also prime.
a(5) = 17 is prime: 19 is next prime. 17^2 - 19 + 1 = 271 which is also prime.
MATHEMATICA
Select[Prime[Range[1000]], PrimeQ[#^2 - NextPrime[#] + 1] &]
Select[Partition[Prime[Range[500]], 2, 1], PrimeQ[#[[1]]^2-#[[2]]+1]&][[All, 1]] (* Harvey P. Dale, Sep 06 2016 *)
PROG
(PARI) c=0; forprime(p = 1, 1e6, if(isprime(p^2 - nextprime(p+1) + 1), c++; print(c, " ", p)))
(Magma) [n: n in [0..10^4] | IsPrime(n) and IsPrime(n^2 - NextPrime(n) +1)]; // Vincenzo Librandi, May 23 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
K. D. Bajpai, May 23 2015
EXTENSIONS
Definition clarified by Harvey P. Dale, Sep 06 2016
STATUS
approved