%I #41 Sep 08 2022 08:45:01
%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,
%T 26,27,28,29,30,31,32,33,34,35,36,37,38,39,42,43,45,46,47,48,50,51,52,
%U 53,54,55,57,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,77,78
%N Numbers n such that n^2 + n + 41 is prime.
%C Among first 100000 terms, the only run of 13 subsequent values >39 is 219..231. - _Zak Seidov_, Jan 28 2009
%C Number of terms less than 10^n: 1, 10, 86, 581, 4149, 31985, 261081, 2208197, 19132652, ... . - _Robert G. Wilson v_, Apr 20 2015
%C Complement of A007634. - _Robert Israel_, Apr 20 2015
%D P. Hoffman, Archimedes' Revenge, pp. 39-40,Penguin Books 1988.
%H Zak Seidov, <a href="/A056561/b056561.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/EulerPrime.html">Euler Prime</a>
%F a(n) = (sqrt(4*A005846(n)-163)-1)/2.
%F a(n) = A002837(n+1)-1. - _Robert Price_, Nov 08 2019
%e 39 is in the sequence because 39^2+39+41=1601 which is prime but 40 is not because 40^2+40+41=1681=41*41.
%p select(t -> isprime(t^2+t+41), [$0..100]); # _Robert Israel_, Apr 20 2015
%t Select[Range[80], PrimeQ[#^2 + # + 41] &] (* _Vincenzo Librandi_, Sep 28 2012 *)
%o (Magma) [n: n in [0..80] |IsPrime(n^2 + n + 41)]; // _Vincenzo Librandi_, Sep 28 2012
%o (Haskell)
%o a056561 n = a056561_list !! (n-1)
%o a056561_list = filter ((== 1) . a010051' . a202018) [0..]
%o -- _Reinhard Zumkeller_, Jul 03 2015
%o (PARI) is(n)=isprime(n^2+n+41) \\ _Charles R Greathouse IV_, Sep 02 2015
%Y Cf. A002837, A005846, A007634, A010051, A202018, A259645.
%K nonn,easy
%O 1,3
%A _Henry Bottomley_, Jun 26 2000