Euler Lucky Number/Examples/41
== Example of Euler Lucky Number ==  The expression: :$n^2 + n + 41$ yields primes for $n = 0$ to $n = 39$. It also generates the same set of primes for $n = -1 \to n = -40$. These are not the only primes generated by this formula. No other quadratic function of the form $x^2 + a x + b$, where $a, b \in \Z_{>0}$ and $a, b < 10000$ generates a longer sequence of primes.  == Proof == {{begin-eqn}} {{eqn | l = 0^2 + 0 + 41       | r = 0 + 0 + 41       | rr= = 41       | c = which is prime }} {{eqn | l = 1^2 + 1 + 41       | r = 1 + 1 + 41       | rr= = 43       | c = which is prime }} {{eqn | l = 2^2 + 2 + 41       | r = 4 + 2 + 41       | rr= = 47       | c = which is prime }} {{eqn | l = 3^2 + 3 + 41       | r = 9 + 3 + 41       | rr= = 53       | c = which is prime }} {{eqn | l = 4^2 + 4 + 41       | r = 16 + 4 + 41       | rr= = 61       | c = which is prime }} {{eqn | l = 5^2 + 5 + 41       | r = 25 + 5 + 41       | rr= = 71       | c = which is prime }} {{eqn | l = 6^2 + 6 + 41       | r = 36 + 6 + 41       | rr= = 83       | c = which is prime }} {{eqn | l = 7^2 + 7 + 41       | r = 49 + 7 + 41       | rr= = 97       | c = which is prime }} {{eqn | l = 8^2 + 8 + 41       | r = 64 + 8 + 41       | rr= = 113       | c = which is prime }} {{eqn | l = 9^2 + 9 + 41       | r = 81 + 9 + 41       | rr= = 131       | c = which is prime }} {{eqn | l = 10^2 + 10 + 41       | r = 100 + 10 + 41       | rr= = 151       | c = which is prime }} {{eqn | l = 11^2 + 11 + 17       | r = 121 + 11 + 17       | rr= = 173       | c = which is prime }} {{eqn | l = 12^2 + 12 + 41       | r = 144 + 12 + 41       | rr= = 197       | c = which is prime }} {{eqn | l = 13^2 + 13 + 17       | r = 169 + 13 + 17       | rr= = 223       | c = which is prime }} {{eqn | l = 14^2 + 14 + 41       | r = 196 + 14 + 41       | rr= = 251       | c = which is prime }} {{eqn | l = 15^2 + 15 + 41       | r = 225 + 15 + 41       | rr= = 281       | c = which is prime }} {{eqn | l = 16^2 + 16 + 41       | r = 256 + 16 + 41       | rr= = 313       | c = which is prime }} {{eqn | l = 17^2 + 17 + 41       | r = 289 + 17 + 41       | rr= = 347       | c = which is prime }} {{eqn | l = 18^2 + 18 + 41       | r = 324 + 18 + 41       | rr= = 383       | c = which is prime }} {{eqn | l = 19^2 + 19 + 41       | r = 361 + 19 + 41       | rr= = 421       | c = which is prime }} {{eqn | l = 20^2 + 20 + 41       | r = 400 + 20 + 41       | rr= = 461       | c = which is prime }} {{eqn | l = 21^2 + 21 + 41       | r = 441 + 21 + 41       | rr= = 503       | c = which is prime }} {{eqn | l = 22^2 + 22 + 41       | r = 484 + 22 + 41       | rr= = 547       | c = which is prime }} {{eqn | l = 23^2 + 23 + 41       | r = 529 + 23 + 41       | rr= = 593       | c = which is prime }} {{eqn | l = 24^2 + 24 + 41       | r = 576 + 24 + 41       | rr= = 641       | c = which is prime }} {{eqn | l = 25^2 + 25 + 41       | r = 625 + 25 + 41       | rr= = 691       | c = which is prime }} {{eqn | l = 26^2 + 26 + 41       | r = 676 + 26 + 41       | rr= = 743       | c = which is prime }} {{eqn | l = 27^2 + 27 + 41       | r = 729 + 27 + 41       | rr= = 797       | c = which is prime }} {{eqn | l = 28^2 + 28 + 41       | r = 784 + 28 + 41       | rr= = 853       | c = which is prime }} {{eqn | l = 29^2 + 29 + 41       | r = 841 + 29 + 41       | rr= = 911       | c = which is prime }} {{eqn | l = 30^2 + 30 + 41       | r = 900 + 30 + 41       | rr= = 971       | c = which is prime }} {{eqn | l = 31^2 + 31 + 41       | r = 961 + 31 + 41       | rr= = 1033       | c = which is prime }} {{eqn | l = 32^2 + 32 + 41       | r = 1024 + 32 + 41       | rr= = 1097       | c = which is prime }} {{eqn | l = 33^2 + 33 + 41       | r = 1089 + 33 + 41       | rr= = 1163       | c = which is prime }} {{eqn | l = 34^2 + 34 + 41       | r = 1156 + 34 + 41       | rr= = 1231       | c = which is prime }} {{eqn | l = 35^2 + 35 + 41       | r = 1225 + 35 + 41       | rr= = 1301       | c = which is prime }} {{eqn | l = 36^2 + 36 + 41       | r = 1296 + 36 + 41       | rr= = 1373       | c = which is prime }} {{eqn | l = 37^2 + 37 + 41       | r = 1369 + 37 + 41       | rr= = 1447       | c = which is prime }} {{eqn | l = 38^2 + 38 + 41       | r = 1444 + 38 + 41       | rr= = 1523       | c = which is prime }} {{eqn | l = 39^2 + 39 + 41       | r = 1521 + 39 + 41       | rr= = 1601       | c = which is prime }} {{eqn | l = 40^2 + 40 + 41       | r = 1600 + 40+ 41       | rr= = 1681       | c = which is not prime: $1681 = 41^2$ }} {{end-eqn}} {{OEIS|A005846}} Then we have: {{begin-eqn}} {{eqn | l = \paren {-\paren  {n + 1} }^2 + \paren {-\paren {n + 1} }       | r = n^2 + 2 n + 1 - \paren {n + 1}       | c =  }} {{eqn | r = n^2 + n       | c =  }} {{end-eqn}} and so replacing $0$ to $39$ with $-1$ to $-40$ yields exactly the same sequence of primes. We note in addition the example: :$581^2 + 581 + 41 = 338 \, 183$ which is prime.  == Sources == * {{BookReference|Curious and Interesting Numbers|1986|David Wells|prev = 41|next = Prime-Generating Quadratic of form x squared - 79 x + 1601}}: $41$ * {{BookReference|Curious and Interesting Numbers|1997|David Wells|ed = 2nd|edpage = Second Edition|prev = 41|next = Euler Lucky Number/Examples/41/Mistake}}: $41$