OFFSET
1,2
COMMENTS
The quadratic polynomial p(k) = k^2 + 21*k + 1 is not a prime-generating polynomial in the sense of Eric Weisstein's World of Mathematics (see link) because p(0) is not prime.
However p(k) is prime for the first 17 positive integral values of k and among polynomials of the form k^2 + j*k + 1, the present polynomial (j = 21) generates more primes than any polynomial of that form for any positive integral j < 231, at least for positive integers, k, in the range 0 < k < 10^6.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Prime-Generating Polynomial
EXAMPLE
17 is in the sequence because 17^2 + 21 * 17 + 1 = 647 is prime.
18 is not in the sequence because 18^2 + 21 * 18 + 1 = 703 = 19 * 37.
MAPLE
select(k-> isprime(k^2+21*k+1), [$1..100])
MATHEMATICA
Select[Range[100], PrimeQ[#^2 + 21# + 1] &] (* Alonso del Arte, Mar 06 2018 *)
PROG
(PARI) isok(k) = isprime(k^2+21*k+1); \\ Altug Alkan, Mar 07 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
James R. Buddenhagen, Mar 06 2018
STATUS
approved