login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A089747
Numbers n such that n^2 - 2n + 5 is prime.
0
0, 2, 4, 6, 8, 14, 16, 18, 28, 34, 36, 38, 46, 48, 58, 66, 68, 74, 86, 88, 96, 98, 104, 116, 118, 126, 136, 138, 148, 156, 164, 168, 178, 184, 194, 204, 208, 216, 218, 234, 236, 244, 246, 254, 256, 266, 268, 276, 278, 288, 294, 304, 308, 314, 318, 348, 358, 374
OFFSET
1,2
REFERENCES
M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna, 1988.
Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano, 1997.
FORMULA
a(n) = A007591(n-1) + 1 for n > 1. [corrected by Georg Fischer, Jun 20 2020]
MATHEMATICA
Select[Range[0, 400, 2], PrimeQ[#^2-2#+5]&] (* Harvey P. Dale, Jan 04 2015 *)
PROG
(Magma) [n: n in [0..100]|IsPrime(n^2-2*n+5)] // Vincenzo Librandi, Nov 16 2010
(PARI) is(n)=isprime(n^2-2*n+5) \\ Charles R Greathouse IV, Jun 13 2017
CROSSREFS
Cf. A005473 gives primes, A007591.
Sequence in context: A054409 A344001 A152973 * A274170 A367745 A173144
KEYWORD
nonn,easy
AUTHOR
Giovanni Teofilatto, Jan 08 2004
STATUS
approved