Prime generators
Inhaltsverzeichnis

Development of
Algorithmic Constructions

04:17:22
DeutschEnglish
19.Apr 2024

Prime generators on quadratic irreducible polynomials

This is a collection of different polynomials of the form f(x)=x^2+bx+c .
The searched polynomials should fulfill the following conditions:
  1. The polynomial should be irreducible.
  2. gcd (b,c) should be equal 1.
  3. c should be a prime number or equal 1, so that f(0) is not a composite value.
  4. Every polynomial should construct a special sequence of primes by the following described algorithm,
    where at least the sequence of the sieved prime numbers is infinite.
The sieved out primes appear in an non arising order in opposite to the sieve of Eratosthenes.

The algorithm

The following described algorithm is the simplest algorithm which calculate an infinite sequence of primes.
The algorithm can be improved of course by several means, but for the understanding the algorithm is limited to this simple form:
  1. All sequences start with x=0 and f(0)=|c| should be a prime number or equal 1.
  2. All values f(x)=x^2+bx+c for x=0 up to n_max with x element N are precalculated.
  3. The factor 2 is eliminated of these values at first.
  4. If f(0) is not equal 1 respectively a prime number, the prime number normally sieved the precalculated list
    by dividing the values of f(x+k*p) and f(p-x-b+k*p) as often as possible, so that the prime number is not any longer a divisior of the values.
  5. If f(1) is not equal 1 respectively a prime number, the prime number normally sieved the precalculated list
    by dividing the values of f(x+k*p) and f(p-x-b+k*p) as often as possible, so that the prime number is not any longer a divisior of the values.
  6. If f(2) is not equal 1 respectively a prime number, the prime number normally sieved the precalculated list
    by dividing the values of f(x+k*p) and f(p-x-b+k*p) as often as possible, so that the prime number is not any longer a divisior of the values.
  7. Step for step the primes at the position f(x) with increasing x are eliminated in the sequence,
    so that only primes either as result of the function or either as reducible primes respectively as rest of divisions remain.

Calculation and sort order

  1. The following loop for b and c was made:

       for c={1, -1, 2, -2, 3, -3, 5, -5 for all primes up to 100, -100}
         for b={0, 1, -1, 2, -2, 3, -3, up to 300, -300}
           calculate the discriminant of f(x)=x^2+bx+c
         end_for;
       end_for;

    The discriminant=b^2-4c was calculated and the polynomial where b is minimal was choosen.
    For other values no suitable polynomials were found.

Every prime p(x) sieves both values of the polynomial for the values x+k*p and p-x+k*p.
Only p=b^2-4c (discriminant) sieves one time the array because x=p-x

Results

There are 239 different polynomials with 20 negativ and 219 positiv discriminants.
The sequence of primes using a prime generator concerning the quadratic irrecucible polynomial is infinite.
You will find an implementation in pseudo code of the algorithm, some mathematical proofs and the distribution of the primes by following the link of the polynomial.

The number 21 could be f(n)=n^2, which could be seen as trivial quadratic polynomial with discriminant=0.

In the following table you find all polynomials listed sorted by the according discriminant.

1.-163nē+163
2.-151nē-8n+167
3.-127nē-16n+191
4.-103nē+103
5.-79nē+79
6.-71nē-12n+107
7.-67nē+67
8.-47nē+47
9.-43nē+43
10.-37nē+37
11.-31nē+8n+47
12.-23nē+23
13.-19nē+19
14.-13nē+13
15.-11nē+11
16.-7nē+7
17.-5nē+5
18.-3nē+3
19.-2nē+2
20.-1nē+1
21.
22.2nē-2
23.3nē-3
24.5nē-5
25.7nē-7
26.11nē-11
27.13nē-13
28.17nē-17
29.19nē+8n-3
30.23nē-23
31.29nē+n-7
32.31nē-12n+5
33.37nē+3n-7
34.41nē-41
35.43nē+12n-7
36.47nē-47
37.53nē+n-13
38.59nē+8n-43
39.61nē+7n-3
40.67nē+16n-3
41.71nē+16n-7
42.73nē+12n-37
43.83nē-83
44.89nē+8n-73
45.97nē-97
46.101nē+3n-23
47.103nē+20n-3
48.107nē+12n-71
49.109nē+9n-7
50.113nē-113
51.127nē-24n+17
52.131nē+20n-31
53.137nē+12n-101
54.139nē+24n+5
55.149nē+9n-17
56.157nē+13n+3
57.163nē+24n-19
58.167nē-167
59.173nē+n-43
60.179nē-28n+17
61.181nē+13n-3
62.191nē-28n+5
63.193nē+28n+3
64.197nē+3n-47
65.199nē-28n-3
66.211nē+58n-3
67.227nē+12n-191
68.233nē+62n+29
69.239nē-32n+17
70.241nē-36n+83
71.251nē+32n+5
72.257nē+20n-157
73.263nē+28n-67
74.269nē+15n-11
75.271nē-66n+5
76.277nē+15n-13
77.281nē+20n-181
78.283nē-36n+41
79.293nē+n-73
80.307nē+70n-3
81.311nē-36n+13
82.313nē+36n+11
83.317nē+13n-37
84.337nē+36n-13
85.347nē+36n-23
86.349nē+19n+3
87.353nē+28n-157
88.367nē+36n-43
89.373nē+19n-3
90.383nē+32n-127
91.389nē+19n-7
92.397nē+21n+11
93.419nē-40n-19
94.421nē+82n-3
95.431nē-44n+53
96.449nē-48n+127
97.461nē+21n-5
98.463nē+86n-3
99.467nē-44n+17
100.479nē-44n+5
101.487nē-44n-3
102.503nē+36n-179
103.509nē+19n-37
104.523nē-48n+53
105.557nē+21n-29
106.563nē+40n-163
107.569nē+48n+7
108.577nē+48n-1
109.587nē+44n-103
110.593nē-44n-109
111.613nē-25n+3
112.617nē-56n+167
113.653nē+19n-73
114.673nē+48n-97
115.677nē+3n-167
116.683nē+48n-107
117.701nē+23n-43
118.743nē-56n+41
119.757nē+27n-7
120.769nē-222n+17
121.773nē+19n-103
122.787nē+56n-3
123.797nē+17n-127
124.821nē+56n-37
125.827nē+56n-43
126.853nē+27n-31
127.857nē+52n-181
128.863nē-60n+37
129.881nē-118n-43
130.887nē+56n-103
131.929nē-60n-29
132.941nē+31n+5
133.947nē+56n-163
134.977nē-68n+179
135.983nē+60n-83
136.1013nē+25n-97
137.1021nē+64n+3
138.1031nē-64n-7
139.1049nē-68n+107
140.1123nē+134n-3
141.1129nē-72n+167
142.1151nē-68n+5
143.1163nē+64n-139
144.1181nē-35n+11
145.1193nē-68n-37
146.1217nē+68n-61
147.1231nē+138n-163
148.1237nē+33n-37
149.1249nē-72n+47
150.1259nē-142n+5
151.1277nē+25n-163
152.1307nē+68n-151
153.1319nē-72n-23
154.1409nē+72n-113
155.1427nē+150n-83
156.1433nē+72n-137
157.1447nē+76n-3
158.1487nē-80n+113
159.1493nē+33n-101
160.1553nē+76n-109
161.1597nē+80n+3
162.1601nē-80n-1
163.1613nē-41n+17
164.1637nē+33n-137
165.1657nē+84n+107
166.1669nē+39n-37
167.1693nē+39n-43
168.1697nē+80n-97
169.1747nē+84n+17
170.1753nē+84n+11
171.1777nē-84n-13
172.1801nē+84n-37
173.1861nē+43n-3
174.1873nē+84n-109
175.1877nē+43n-7
176.1931nē+84n-167
177.1933nē+45n+23
178.1949nē+88n-13
179.1979nē+88n-43
180.1997nē+41n-79
181.2113nē-92n+3
182.2129nē+92n-13
183.2153nē-96n+151
184.2273nē-92n-157
185.2297nē+92n-181
186.2309nē+96n-5
187.2351nē-96n-47
188.2411nē+96n-107
189.2441nē-100n+59
190.2477nē+43n-157
191.2621nē+51n-5
192.2657nē+100n-157
193.2687nē-104n+17
194.2693nē+49n-73
195.2789nē+49n-97
196.2833nē+108n+83
197.2857nē-108n+59
198.2897nē-108n+19
199.2903nē-108n+13
200.3037nē+55n-3
201.3307nē-230n-3
202.3359nē-116n+5
203.3433nē-120n+167
204.3461nē+53n-163
205.3533nē+53n-181
206.3541nē-238n-3
207.3677nē-124n+167
208.3797nē-61n-19
209.3847nē+124n-3
210.3907nē-250n-3
211.3989nē+59n-127
212.4049nē+128n+47
213.4093nē-63n-31
214.4177nē-132n+179
215.4253nē-65n-7
216.4297nē+132n+59
217.4483nē+132n-127
218.4513nē+132n-157
219.4517nē-136n+107
220.4903nē-140n-3
221.4973nē+140n-73
222.4993nē-144n+191
223.5081nē+140n-181
224.5273nē+144n-89
225.5309nē+69n-137
226.5701nē+75n-19
227.5953nē-156n+131
228.6079nē-156n+5
229.6397nē+81n+41
230.6737nē-164n-13
231.7213nē+85n+3
232.8819nē-188n+17
233.9833nē+200n+167
234.10597nē+103n+3
235.12473nē+224n+71
236.13001nē+228n-5
237.13049nē+228n-53
238.13177nē+228n-181
239.15937nē+252n-61
240.21313nē+292n+3