Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #41 Sep 08 2022 08:44:50
%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,21,22,23,24,26,27,28,29,
%T 30,31,35,37,38,40,42,44,45,46,47,49,53,56,57,59,60,62,63,64,70,72,73,
%U 75,76,79,81,82,86,87,91,92,95,98,103,104,108,109,110,113,114
%N Numbers k such that k^2 + k + 17 is prime.
%C Complement of A007636. - _Michel Marcus_, Jun 17 2013
%H Seiichi Manyama, <a href="/A028823/b028823.txt">Table of n, a(n) for n = 1..10000</a>
%H Patrick De Geest, <a href="http://www.worldofnumbers.com/quasimor.htm">Palindromic Quasi_Over_Squares of the form n^2+(n+X)</a>
%e 15^2 + 15 + 17 = 257, which is prime, so 15 is in the sequence.
%e 16^2 + 16 + 17 = 289 = 17^2, so 16 is not in the sequence. Much more obviously, 17 is not in the sequence either.
%t Select[Range[0, 199], PrimeQ[#^2 + # + 17] &] (* _Indranil Ghosh_, Mar 19 2017 *)
%o (Magma) [n: n in [0..1000] |IsPrime(n^2+n+17)] // _Vincenzo Librandi_, Nov 19 2010
%o (PARI) is(n)=isprime(n^2+n+17) \\ _Charles R Greathouse IV_, Feb 20 2017
%o (Python)
%o from sympy import isprime
%o print([n for n in range(201) if isprime(n**2 + n + 17)]) # _Indranil Ghosh_, Mar 19 2017
%Y Cf. A007635, A007636, A014556.
%K nonn
%O 1,3
%A _Patrick De Geest_