OFFSET
1,1
COMMENTS
For k=0 to 23, this expression generates 24 primes that decrease from 4871 to 41. It generates duplicates and the absolute value is used to avoid negative terms. The same 24 primes but in reverse order are generated in the same range of the argument by 7*k^2+49*k+41, which produces neither duplicates nor negative values and is one of relatively few quadratics with at most two-digit coefficients that generate at least 20 primes in a row. We have: 7*(n-30)^2 + 49*(n-30) + 41 = 7*n^2 - 371*n + 4871. - Waldemar Puszkarz, Feb 02 2018
See also A298078, the values of 7*n^2-7*n-43, which also contains the same 24 primes without duplicates. - N. J. A. Sloane, Mar 10 2018
LINKS
Robert Price, Table of n, a(n) for n = 1..3530
Eric Weisstein's World of Mathematics, Prime-Generating Polynomials
EXAMPLE
4157 is in this sequence since 7*2^2 - 371*2 + 4871 = 28-742-4871 = 4157 is prime.
MAPLE
select(isprime, [seq(7*n^2-371*n+4871, n=0..10^2)]); # Muniru A Asiru, Feb 04 2018
MATHEMATICA
n = Range[0, 100]; Select[Abs[7n^2 - 371n + 4871], PrimeQ[#] &]
PROG
(PARI) lista(nn) = for(n=0, nn, if(ispseudoprime(p=abs(7*n^2-371*n+4871)), print1(p, ", "))); \\ Altug Alkan, Apr 19 2016
(GAP) Filtered(List([0..10^2], n->7*n^2-371*n+4871), IsPrime); # Muniru A Asiru, Feb 04 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Price, Apr 19 2016
STATUS
approved