A100357 Numbers k such that 2^k + k^2 + 1 is prime.
0, 6, 12, 18, 162, 192, 216, 420, 1524, 5112, 7404, 24216, 25944, 101832, 346854
Offset: 1
Keywords
Programs
-
Magma
[n: n in [0..800] | IsPrime(2^n + n^2 + 1) ]; // Vincenzo Librandi, Sep 03 2012
-
Mathematica
{ta={{0}}, tb={{0}}}; Do[g=n;s=2^n+n^2+1;If[PrimeQ[s], Print[n];ta=Append[ta, n];tb=Append[tb, s]], {n, 0, 10000, 6}];{ta, tb, g} Select[Range[0, 10000, 6], PrimeQ[2^# + #^2 + 1] &] (* Vincenzo Librandi, Sep 03 2012 *)
-
PARI
is(n)=isprime(2^n+n^2+1) \\ Charles R Greathouse IV, Jul 01 2013
Extensions
Added a(1) from Vincenzo Librandi, Sep 03 2012
a(12)-a(14) from Giovanni Resta, Mar 23 2014
Mathematica codes edited by Zak Seidov, Apr 05 2014
a(15) from Robert Price, Jun 15 2014
Comments