Proofs of Existence and Optimality · Constructive Proofs of Existence

Lesson 4

Nikolai Chukhin · Alexander S. Kulikov

Problem. Recall that a number \(p \in \mathbb{Z}_{>0}\) is called prime if it is divisible only by one and itself. The number \(p=1\) is traditionally not considered prime. Here are some of the first prime numbers.

from sympy import primerange

print(*primerange(130))

2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127

Euler discovered that the polynomial \(p(n)=n^{2}-n+41\) has an amazing property: for small \(n\), the value of \(p(n)\) is prime.

from sympy import isprime


def p(n):
    return n ** 2 - n + 41


for n in range(1, 35):
    print(n, p(n), isprime(p(n)))

1 41 True
2 43 True
3 47 True
4 53 True
5 61 True
6 71 True
7 83 True
8 97 True
9 113 True
10 131 True
11 151 True
12 173 True
13 197 True
14 223 True
15 251 True
16 281 True
17 313 True
18 347 True
19 383 True
20 421 True
21 461 True
22 503 True
23 547 True
24 593 True
25 641 True
26 691 True
27 743 True
28 797 True
29 853 True
30 911 True
31 971 True
32 1033 True
33 1097 True
34 1163 True

Is it true that \(p(n)\) will be prime for all non-negative integers \(n\)? (In other words, does there exist \(n \in \mathbb{Z}_{\ge 0}\) such that \(p(n)=n^{2}-n+41\) is not prime?)

5 points
  1. Yes, \(p(n)\) is prime for all non-negative integers \(n\).

  2. No, there exists a non-negative integer \(n\) such that \(p(n)\) is not prime.