The formula n^{2} + n + 35 is prime for all 0≤n≤33 (this formula can generate 34 different primes for this 34 consecutive n, and can generate 68 primes for 68 consecutive n (from −34 to 33)), n^{2} + n + p is also prime for 0≤n≤p−2 (since it is divisible by p for n = p−1, one cannot do be better than this) for p = 2, 3, 5, E and 15, they are called Euler's lucky numbers, and corresponding to the Heegner numbers (squarefree numbers d such that the imaginary quadratic field
has class number 1) 7, E, 17, 37, 57 and 117 (if and only if n^{2} + n + p is prime for 0≤n≤p−2, then 4p−1 is a Heegner number), there are no such p > 35, and there are no Heegner number > 117.
The formula 2n^{2} + 25 is prime for all 0≤n≤24 (this formula can generate 25 different primes for this 25 consecutive n, and can generate 49 primes for 49 consecutive n (from −24 to 24)), 2n^{2} + p is also prime for 0≤n≤p−1 (since it is divisible by p for n = p, one cannot do be better than this) for p = 3, 5 and E, they are called Euler's quasi-lucky numbers, and corresponding to the quasi-Heegner numbers (even squarefree numbers d such that the imaginary quadratic field
has class number 2) 6, X, 1X and 4X (if and only if 2n^{2} + p is prime for 0≤n≤p−1, then 2p is a quasi-Heegner number), there are no such p > 25, and there are no quasi-Heegner number > 4X.
f(n) | prime with n range | number of such consecutive n | number of distinct primes | largest prime | smallest composite |
n^{2} + n + 35 | [−34, 33] | 68 | 34 | E15 | E81 = 35^{2} |
n^{2} + n + 15 | [−14, 13] | 28 | 14 | 195 | 201 = 15^{2} |
n^{2} + n + E | [−X, 9] | 18 | X | 85 | X1 = E^{2} |
2n^{2} + 25 | [−24, 24] | 49 | 25 | E11 | EX7 = 25 × 4E |
2n^{2} + E | [−X, X] | 19 | E | 157 | 191 = E × 1E |
4n^{2} + 117 | [−17, 17] | 33 | 18 | E1E | 102E = 35 × 37 |
4n^{2} + 57 | [−7, 7] | 13 | 8 | 19E | 22E = 15 × 17 |
4n^{2} + 31 | [−8, 8] | 15 | 9 | 205 | 261 = 17^{2} |
2n^{2} + 2n + 17 | [−16, 15] | 30 | 16 | 447 | 4X7 = 17 × 31 |
3n^{2} + 3n + 1E | [−1X, 19] | 38 | 1X | 995 | X85 = 1E × 57 |
4n^{2} + 4n + 465 | [−16, 15] | 30 | 16 | 1105 | 1205 = 37 × 3E |
6n^{2} + 6n + 27 | [−25, 24] | 4X | 25 | 2X07 | 3057 = 4E × 75 |
|n^{2} + n − 91| (allow the number 1 to be prime) | [−24, 23] | 48 | 24 (including the number 1) | 45E | 4X7 = 17 × 31 |
|2n^{2} − 147| (allow the number 1 to be prime) | [−23, 23] | 47 | 24 (including the number 1) | 88E | 961 = 31^{2} |
|2n^{2} − 131| | [−23, 23] | 47 | 24 | 8X5 | 977 = 17 × 61 |
|4n^{2} − 16E| | [−18, 18] | 35 | 19 | 965 | X81 = 25 × 45 |
|4n^{2} − 11E| | [−14, 14] | 29 | 15 | 5E5 | 6X5 = 1E × 37 |
|2n^{2} + 2n − 95| (allow the number 1 to be prime) | [−1X, 19] | 38 | 1X (including the number 1) | 577 | 62E = 25 × 27 |
|2n^{2} + 2n − 6E| (allow the number 1 to be prime) | [−15, 14] | 2X | 15 (including the number 1) | 325 | 381 = 1E^{2} |
|4n^{2} + 4n − 291| | [−23, 22] | 46 | 23 | 148E | 162E = 31 × 5E |