%I M5273 #120 Sep 21 2024 08:45:33
%S 41,43,47,53,61,71,83,97,113,131,151,173,197,223,251,281,313,347,383,
%T 421,461,503,547,593,641,691,743,797,853,911,971,1033,1097,1163,1231,
%U 1301,1373,1447,1523,1601,1847,1933,2111,2203,2297,2393,2591,2693,2797
%N Primes of the form n^2 + n + 41.
%C Note that 41 is the largest of Euler's Lucky numbers (A014556). - _Lekraj Beedassy_, Apr 22 2004
%C a(n) = A117530(13, n) for n <= 13: a(1) = A117530(13, 1) = A014556(6) = 41, A117531(13) = 13. - _Reinhard Zumkeller_, Mar 26 2006
%C The link to E. Wegrzynowski contains the following incorrect statement: "It is possible to find a polynomial of the form n^2 + n + B that gives prime numbers for n = 0, ..., A, A being any number." It is known that the maximum is A = 39 for B = 41. - Luis Rodriguez (luiroto(AT)yahoo.com), Jun 22 2008
%C Contrary to the last comment, Mollin's Theorem 2.1 shows that any A is possible if the Prime k-tuples Conjecture is assumed. - _T. D. Noe_, Aug 31 2009
%C a(n) can be generated by a recurrence based on the gcd in the type of _Eric Rowland_ and Aldrich Stevens. See the recurrence in PARI under PROG. - _Mike Winkler_, Oct 02 2013
%C These primes are not prime in O_(Q(sqrt(-163)). Given p = n^2 + n + 41, we have ((2n + 1)/2 - sqrt(-163)/2)((2n + 1)/2 + sqrt(-163)/2) = p, e.g., 1601 = 39^2 + 39 + 41 = (79/2 - sqrt(-163)/2)(79/2 + sqrt(-163)/2). - _Alonso del Arte_, Nov 03 2017
%C From _Peter Bala_, Apr 15 2018: (Start)
%C The polynomial P(n) := n^2 + n + 41 takes distinct prime values for the 40 consecutive integers n = 0 to 39. It follows that the polynomial P(n-40) takes prime values for the 80 consecutive integers n = 0 to 79, consisting of the 40 primes above each taken twice. We note two consequences of this fact.
%C 1) The polynomial P(2*n-40) = 4*n^2 - 158*n + 1601 also takes prime values for the 40 consecutive integers n = 0 to 39.
%C 2) The polynomial P(3*n-40) = 9*n^2 - 237*n + 1601 takes prime values for the 27 consecutive integers n = 0 to 26 ( = floor(79/3)). In addition, calculation shows that P(3*n-40) also takes prime values for n from -13 to -1. Equivalently put, the polynomial P(3*n-79) = 9*n^2 - 471*n + 6203 takes prime values for the 40 consecutive integers n = 0 to 39. This result is due to Higgins. Cf. A007635 and A048059. (End)
%D R. K. Guy, Unsolved Problems Number Theory, Section A1.
%D O. Higgins, Another long string of primes, J. Rec. Math., 14 (1981/2) 185.
%D Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 137.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Zak Seidov, <a href="/A005846/b005846.txt">Table of n, a(n) for n = 1..10000.</a>
%H Phil Carmody, <a href="http://fatphil.org/maths/DragRace/">Drag Racing Prime Numbers!</a> - _Vladimir Joseph Stephan Orlovsky_, Jul 24 2011
%H Richard K. Guy, <a href="/A005165/a005165.pdf">The strong law of small numbers</a>. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
%H R. A. Mollin, <a href="http://www.jstor.org/stable/2975080">Prime-producing quadratics</a>, Amer. Math. Monthly 104 (1997), 529-544.
%H E. Wegrzynowski, <a href="http://web.archive.org/web/20160413222527/http://www.lifl.fr/~wegrzyno/FormulPrem/FormulesPremiers23.html">Les formules simples qui donnent des nombres premiers en grande quantité</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/EulerPrime.html">Euler Prime</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Prime-GeneratingPolynomial.html">Prime-Generating Polynomial</a>
%F a(n) = A056561(n)^2 + A056561(n) + 41.
%e a(39) = 1601 = 39^2 + 39 + 41 is in the sequence because it is prime.
%e 1681 = 40^2 + 40 + 41 is not in the sequence because 1681 = 41*41.
%p for y from 0 to 10 do
%p U := y^2+y+41;
%p if isprime(U) = true then print(U) end if ;
%p end do:
%p # _Matt C. Anderson_, Jan 04 2013
%t Select[Table[n^2 + n + 41, {n, 0, 59}],PrimeQ] (* _Alonso del Arte_, Dec 08 2011 *)
%o (PARI) for(n=1,1e3,if(isprime(k=n^2+n+41),print1(k", "))) \\ _Charles R Greathouse IV_, Jul 25 2011
%o (Haskell)
%o a005846 n = a005846_list !! (n-1)
%o a005846_list = filter ((== 1) . a010051) a202018_list
%o -- _Reinhard Zumkeller_, Dec 09 2011
%o (PARI) {k=2; n=1; for(x=1, 100000, f=x^2+x+41; g=x^2+3*x+43; a=gcd(f, g-k); if(a>1, k=k+2); if(a==x+2-k/2, print(n" "a); n++))} \\ _Mike Winkler_, Oct 02 2013
%o (GAP) Filtered(List([0..100],n->n^2+n+41),IsPrime); # _Muniru A Asiru_, Apr 22 2018
%o (Magma) [a: n in [0..55] | IsPrime(a) where a is n^2+n+ 41]; // _Vincenzo Librandi_, Apr 24 2018
%Y Cf. A048988, A007634, A056561, A002378, A007635.
%Y Intersection of A000040 and A202018; A010051.
%Y Cf. A048059.
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_
%E More terms from _Henry Bottomley_, Jun 26 2000