Lucky numbers of Euler

Euler's “lucky” numbers are positive integers n such that for all integers k with 1 ≤ k < n, the polynomial k2k + n produces a prime number.

When k is equal to n, the value cannot be prime anymore since n2n + n = n2 is divisible by n. Since the polynomial can be rewritten as k (k−1) + n, using the integers k with −(n−1) < k ≤ 0 produces the same set of numbers as 1 ≤ k < n.

Leonhard Euler published the polynomial k2k + 41 which produces prime numbers for all integer values of k from 1 to 40. Only 7 lucky numbers of Euler exist, namely 1, 2, 3, 5, 11, 17 and 41 (sequence A014556 in the OEIS).

The primes of the form k2 - k + 41 are

41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, ... (sequence A005846 in the OEIS)

Lucky numbers of Euler have the mathematical property,such that if m is a lucky number of Euler, then the expression, n^2-n+m is a prime number for n=1,2,...,m-1.

These numbers are not related to the lucky numbers generated by a sieve algorithm. In fact, the only number which is both lucky and Euler-lucky is 3, since all other Euler-lucky numbers are congruent to 2 mod 3, but no lucky numbers are congruent to 2 mod 3.