login
Numbers k such that k^2 + k - 1 is prime.
28

%I #25 Feb 21 2022 01:13:59

%S 2,3,4,5,6,8,9,10,11,13,15,16,19,20,21,24,26,28,30,31,35,38,39,41,44,

%T 45,46,48,50,53,54,55,56,59,60,64,65,66,68,70,76,83,85,86,89,93,94,96,

%U 100,101,103,114,115,120,125,126,130,131,134,138,140

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

%D L. Poletti, Le serie dei numeri primi appartenente alle due forme quadratiche (A) n^2+n+1 e (B) n^2+n-1 ..., Atti della Reale Accademia Nazionale dei Lincei, Memorie della Classe di Scienze Fisiche, Matematiche e Naturali, s. 6. 3 (1929), 193-218.

%H Amiram Eldar, <a href="/A045546/b045546.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Vincenzo Librandi)

%t lst={};Do[If[PrimeQ[n^2+n-1], Print[n];AppendTo[lst, n]], {n, 10^5}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 25 2008 *)

%t Select[Range[150],PrimeQ[#^2+#-1]&] (* _Harvey P. Dale_, Jan 27 2012 *)

%o (Magma) [n: n in [0..140] | IsPrime(n^2 + n - 1)]; // _Vincenzo Librandi_, Sep 27 2012

%o (PARI) is(n)=isprime(n^2 + n - 1) \\ _Charles R Greathouse IV_, Apr 28 2015

%Y Equals A002328-1. Cf. A002327, A002384.

%K nonn,nice,easy

%O 1,1

%A Paul Jobling (paul.jobling(AT)whitecross.com)