A055494 Numbers k such that k^2 - k + 1 is prime.
2, 3, 4, 6, 7, 9, 13, 15, 16, 18, 21, 22, 25, 28, 34, 39, 42, 51, 55, 58, 60, 63, 67, 70, 72, 76, 78, 79, 81, 90, 91, 100, 102, 106, 111, 112, 118, 120, 132, 139, 142, 144, 148, 151, 154, 156, 162, 163, 165, 168, 169, 174, 177, 189, 190, 193, 195, 204, 207, 210, 216
Offset: 1
References
- M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
- D. E. Knuth, "The Art of Computer Programming," Addison-Wesley, Reading, MA, Volume II, page 378.
- Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta,UTET, CittaStudiEdizioni, Milano 1997.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Eric Weisstein's World of Mathematics, Eisenstein Prime.
Programs
-
Magma
[n: n in [1..300] |IsPrime(n^2 - n + 1)]; // Vincenzo Librandi, Sep 28 2012
-
Mathematica
Select[Range[300], PrimeQ[#^2 - # + 1] &] (* Vincenzo Librandi, Sep 28 2012 *) lst = {}; Do[If[ResourceFunction["EisensteinIntegers"][n + w, w, "PrimeQ"],AppendTo[lst, n]], {n, 1, 300}]; lst (* Frank M Jackson, Jul 15 2025 *)
-
PARI
is(n)=isprime(n^2-n+1) \\ Charles R Greathouse IV, Feb 16 2017
Extensions
More terms from David Wasserman, Sep 15 2005
Comments