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”).

Numbers k such that k^2 + 2k + 2 is prime.
1

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

%S 0,1,3,5,9,13,15,19,23,25,35,39,53,55,65,73,83,89,93,109,115,119,123,

%T 125,129,133,145,149,155,159,169,175,179,183,203,205,209,223,229,235,

%U 239,249,255,259,263,269,279,283,299,305,313,325,339,349

%N Numbers k such that k^2 + 2k + 2 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

%H Vincenzo Librandi, <a href="/A089593/b089593.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A005574(n)-1 = A090693(n)-2.

%t Select[Range[0,1000],PrimeQ[#^2+2#+2]&] (* _Vincenzo Librandi_, May 23 2014 *)

%o (Magma)[n: n in [0..400]|IsPrime(n^2+2*n+2)]; // _Vincenzo Librandi_, Dec 17 2010

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

%Y Cf. A002496 gives the primes, A005574, A090693.

%K nonn,easy

%O 1,3

%A _Giovanni Teofilatto_, Dec 30 2003

%E Corrected by _Vincenzo Librandi_, Dec 17 2010