login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089747 Numbers n such that n^2 - 2n + 5 is prime. 0

%I #21 Sep 08 2022 08:45:12

%S 0,2,4,6,8,14,16,18,28,34,36,38,46,48,58,66,68,74,86,88,96,98,104,116,

%T 118,126,136,138,148,156,164,168,178,184,194,204,208,216,218,234,236,

%U 244,246,254,256,266,268,276,278,288,294,304,308,314,318,348,358,374

%N Numbers n such that n^2 - 2n + 5 is prime.

%D M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna, 1988.

%D Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano, 1997.

%F a(n) = A007591(n-1) + 1 for n > 1. [corrected by _Georg Fischer_, Jun 20 2020]

%t Select[Range[0,400,2],PrimeQ[#^2-2#+5]&] (* _Harvey P. Dale_, Jan 04 2015 *)

%o (Magma) [n: n in [0..100]|IsPrime(n^2-2*n+5)] // _Vincenzo Librandi_, Nov 16 2010

%o (PARI) is(n)=isprime(n^2-2*n+5) \\ _Charles R Greathouse IV_, Jun 13 2017

%Y Cf. A005473 gives primes, A007591.

%K nonn,easy

%O 1,2

%A _Giovanni Teofilatto_, Jan 08 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)