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:
The polynomial should be irreducible.
gcd (b,c) should be equal 1.
c should be a prime number or equal 1, so that f(0) is not a composite value.
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:
All sequences start with x=0 and f(0)=|c| should be a prime number or equal 1.
All values f(x)=x^2+bx+c for x=0 up to n_max with x element N are precalculated.
The factor 2 is eliminated of these values at first.
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.
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.
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.
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
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.