The n-primality test
PRIME NUMBER SERIES 7
The n-primality test
This primality test is not a probability test but an indirect test to determine clearly if a choosed uneven number greater than 1 is prime or not.
It is based on definition 6 of prime number series 1:
Because of the existence of an infinite quantity of primes and only one even prime namely 2 follows that an infinite quantity of uneven primes must exist. Because of this the definition of all primes greater then 2 is:
A prime greater than 2 is an uneven number U greater than 2, that is not divisible integrally by any uneven number u in the domain
For this reason only uneven numbers > 1 are used for this test.
With
ᴧ n ∈ ℕ
all uneven numbers > 1 are given, which can be selected for this test.
Solved for n gives
The determined n is put into the following test function t(n):
with
and n ∈ ℕ and n≥1 as well as k ∈ ℕ und k≥0.
Legend:
product, with running variable k from 0 up to kmax
|x| absolute value of any value x
⌊x⌋ lower Gaussian bracket, x rounded down to the next integer
⌈x⌉ upper Gaussian bracket, x rounded up to the next integer
t(n) is either 0 or 1 for a choosed n>0 from the set of the natural numbers.
If t(n)=0, then 2n+3 is not prime for the choosed n.
If t(n)=1, then 2n+3 is prime for the choosed n.
Proof:
In prime number series 6 it has been proofed, that the formula
nkm = 2k²+6k+3+m(2k+3) ʌ k, m ∈ ℕ
provides those n, which give all composite uneven numbers greater than 2 in the formula 2n+3.
Determining all nkm, which are close by the choosed n, it can be determined, if there is any nkm, for which is valid:
n = nkm
or if there is not any nkm, which equals n, meaning:
n ≠ nkm
Establishing this deterministic it is necessary to determine any nkm from k=0 up to kmax. For value m it is enough, if only mmax is used in correlation with k in the domain from 0 up to kmax. Value mmax is that m, which is determines that nkm-value for each k in the domain from 0 up to kmax, which is closest to the choosed n and in the extreme case equals n.
But how great are the values kmax und mmax?
To begin with kmax:
According to definition 6, prime number series 1 is the following valid:
A prime greater than 2 is an uneven number U, that is not divisible integrally by any uneven number u in the domain .
Putting
U=2n+3 ᴧ n ∈ ℕ
and
u=2k+3 ᴧ k ∈ ℕ
into
gives
The solutions for k and the selected n spread from k=0 up to k=kmax for n, k ∈ ℕ.
kmax shall be determined as a natural number. But solving for k we come into the domain of real numbers. Therefore we write for better differentiation:
Solved for gives:
The real solution can be lead back into the domain of natural numbers by rounding up or down.
According to definition 6, prime number series 1 it has to be rounded down.
Additionally shall be
The reason for this is that it shall be
And that must be also the case for
For this reason it is not necessary for this test to use every m in nkm , but only mmax in correlation with k.
Because k and with that kmax must be ≥ 0 and kmax
would be negative for n=1 and n=2,
has to be calculated as absolute value.
Thus the value for kmax is
The term
can take on only the values 0 or 1, if
→
→
is ruled out as follows:
Substituting nkm in the formula
nkm = 2k²+6k+3+m(2k+3) ʌ k, m ∈ ℕ
by any n ∈ ℕ and letting k in the natural number domain m turns into the real number .
Solved for , gives
As the solution for mmax must be integer and shall be ≤ n, has to be rounded down. Thus we get
Put into the formula for nkm gives
This in his turn put into
gives
This term can take on only the values 0 or 1 because of .
Is this term 0 the choosed n gives no prime in the formula 2n+3 but a composite uneven number.
Is this term 1 the choosed n can give a prime in the formula 2n+3 but not forcible.
But forming the product for all k’s from 0 up to kmax and is’nt this product 0 but 1, then it is ensured clearly with this deterministic primality test, that 2n+3 is prime. But is in this product at least one factor 0, then the entire product is 0 and it is ensured clearly with this deterministic primality test, that 2n+3 is not prime.
What had to be proved.
Examples:
n=1 → t(1)=1 → 2*1+3=5 → prime
n=10 → t(10)=1 → 2*10+3=23 → prime
n=97 → t(97)=1 → 2*97+3=197 → prime
n=1001 → t(1001)=0 → 2*1001+3=2005 → not prime
n=30997 → t(30997)=0 → 2*30997+3=61997=13*19*251 → not prime
n=30103 → t(30103)=1 → 2*30103+3=60209 → prime
The following table shows the results from n=1 up to n=20:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 |
Following table shows the results from n=1470 up to n=1480:
1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 |
0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 |
Munich, 24 October 2022
Gottfried Färberböck