login
Numbers n such that n^2 + 2n - 1 is prime.
3

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

%S 1,2,4,6,8,12,14,18,20,26,28,32,34,36,42,46,48,54,60,62,68,70,74,76,

%T 88,92,102,106,116,118,120,126,130,134,138,144,154,160,168,172,176,

%U 182,190,204,210,216,222,230,232,236,238,246,252,256,258,264,266,272

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

%C Equivalently, numbers n such that (n+1)^2 - 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="/A089623/b089623.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = 2*A088572(n).

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

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

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

%Y Cf. A088572. See A028871 for the actual primes.

%K nonn,easy

%O 1,2

%A _Giovanni Teofilatto_, Dec 31 2003

%E Corrected (1 prepended and 96 replaced with 92) by _Vincenzo Librandi_, Dec 17 2010