_{1}

^{*}

In the history of mathematics different methods have been used to detect if a number is prime or not. In this paper a new one will be shown. It will be demonstrated that if the following equation is zero for a certain number p , this number p would be prime. And being m an integer number higher than (the lowest, the most efficient the operation). . If the result is an integer, this result will tell us how many permutations of two divisors, the input number has. As you can check, no recurrent division by odd or prime numbers is done, to check if the number is prime or has divisors. To get to this point, we will do the following. First, we will create a domain with all the composite numbers. This is easy, as you can just multiply one by one all the integers (greater or equal than 2) in that domain. So, you will get all the composite numbers (not getting any prime) in that domain. Then, we will use the Fourier transform to change from this original domain (called discrete time domain in this regards) to the frequency domain. There, we can check, using Parseval’s theorem, if a certain number is there or not. The use of Parseval’s theorem leads to the above integral. If the number p that we want to check is not in the domain, the result of the integral is zero and the number is a prime. If instead, the result is an integer, this integer will tell us how many permutations of two divisors the number p has. And, in consequence information how many factors, the number p has. So, for any number p lower than 2m - 1, you can check if it is prime or not, just making the numerical definite integration. We will apply this integral in a computer program to check the efficiency of the operation. We will check, if no further developments are done, the numerical integration is inefficient computing-wise compared with brute-force checking. To be added, is the question regarding the level of accuracy needed (number of decimals and number of steps in the numerical integration) to have a reliable result for large numbers. This will be commented on the paper, but a separate study will be needed to have detailed conclusions. Of course, the best would be that in the future, an analytical result (or at least an approximation) for the summation or for the integration is achieved.

In this paper, we will obtain the following integral:

1 2π ∫ − π π e p j ω ( ∑ k = 2 k = m + 1 e − 2 k j ω ( 1 − e − m k j ω 1 − e − k j ω ) ) d ω (1)

Being p the number that we want to check if it is a prime or not. And being m whatever integer number higher than ( p + 1 ) / 2 . If the result is zero (or it is so small that it can be considered to be zero) the number p is a prime. If not, the result will tell us how many permutations of two divisors, the number p has.

To obtain the integral (1), the following steps shall be taken. First, we will create a domain with all the composite numbers in the domain included.

Then, we will use the Fourier transform [

Using the Parseval’s theorem, we can check if a certain number is the above created domain or not. The use of Parseval’s theorem will lead to the above integration.

If the number p that we want to check is not in the domain, the result of the integration is zero and the number is a prime. If instead, the result is an integer, this integer will tell us how many permutations of two divisors the number p has. And in consequence, how many divisors, the number has.

As k and ω are independent variables, the sum can be taken outside the integral. You can see that implementation in below Matlab/Octave program (

It is very easy to create a matrix with the only composite numbers in certain domain. We can make that each element of the matrix is the result of the product of two integers in certain domain. We can perform this operation one by one until having used all the integers. So, the result will be all the composite numbers in certain domain.

You can see an example in

And the result attached in

We can see that all the composite numbers between 4 and 10 are included in the matrix: 4, 6, 8, 9, 10. And as expected, the prime numbers 2, 3, 5 and 7 not. But we can see that the number 14 that is composite is not included. Why? Because it is composed by 7 × 2 and the 7 is not included in the multiplications. This means, the domain where it is valid that all the composite numbers are included (and none of the integers) finishes in 2 × 5 = 10 (being 5 the last number we are using in the multiplications). We can also see that it is a symmetric matrix that will have implications in the following chapters.

We can increase the matrix to 7 for example and see the same effect (

As 2 × 7 = 14, we know that the result will be reliable until 14. This means, all the composite numbers until 14 have to be included in the matrix: 4, 6, 8, 9, 10, 12 and 14. And not the primes: 2, 3, 5, 7, 11, 13. We can see again that the composite number 22 = 11 × 2 is not included in the matrix. This is because 11 has not be included in the multiplications. The reliable domain is until 7 × 2 = 14, as commented.

The nomenclature that we will use in the following chapters for the general case will be the following (see

This means, the reliable domain (the domain where all the composite numbers will be included in the matrix) will be up to 2 × (m + 1).

Now, the next movements will be quite straight forward. The first thing we have to do, is to introduce these calculated composite numbers in the discrete time domain. We will put unitary delta functions in the positions of the x axis indicated by the matrix of composite numbers (

We can see that in the above graphic, each Dirac delta represent the product of two integers, that compose a composite number. This means, each Dirac delta means that the composite number has a factorization of two numbers. And the order counts. This is, 2 × 4 counts one and 4 × 2 counts another one.

If we have only one Dirac Delta, it means that it has only one multiplication (therefore it is a square of a prime number) like 4 = 2 × 2 or 9 = 3 × 3 for example. If the number of Dirac deltas is odd, the number has an integer square root. If the number is even, it has different permutations of different products, but it does not have an integer square root.

We can create a function that is the sum of all these deltas. And this function will have the information of all these composite numbers. This function in the discrete domain is defined like this:

f ( n ) = ∑ k 1 = 2 k 1 = m + 1 ∑ k 2 = 2 k 2 = m + 1 δ ( n − k 1 ⋅ k 2 ) = ∑ k = 2 k = m + 1 ( δ ( n − 2 ⋅ k ) + δ ( n − 3 ⋅ k ) + δ ( n − 4 ⋅ k ) + ⋯ + δ ( n − ( m + 1 ) ⋅ k ) ) = δ ( n − 2 ⋅ 2 ) + δ ( n − 2 ⋅ 3 ) + ⋯ + δ ( n − 2 ⋅ ( m + 1 ) ) + δ ( n − 3 ⋅ 2 ) + δ ( n − 3 ⋅ 3 ) + ⋯ + δ ( n − ( m + 1 ) ⋅ ( m + 1 ) ) (2)

This function f(n) has the information regarding all the composite numbers inside the domain 2 × (m + 1). But, the important information there is what it is not included. All the integers smaller than 2 × (m + 1) that are not included in this function, are prime numbers.

How do we spot them? If we want to know if the number 5 is prime or not. We have to check if there is a Dirac delta in position 5. This means, we have to

check if the following function g(n) is inside the function f(n):

g ( n ) = δ ( n − 5 ) (3)

In general, if we want to check if whatever number p is prime, g(n) would be:

g ( n ) = δ ( n − p ) (4)

We could do this performing the multiplication one by one for all the points in x axis between the function f(n) and the function g(n).

As the function g(n) is zero everywhere except in the point 5 (or in general, in p), if the result of the multiplication point by point between f(n) and g(n) is zero, it means that f(n) does not have a Dirac delta in 5. So, number 5 is prime.

If the result is different, it will tell us the value of f(n) at that point. And the value of f(n) at that point is the number of deltas included. This means, the number of all the possible multiplications of two integers that compose that number.

The problem is that to perform this operation in the time domain, does not add any value. Because to know the result, we have to compare “manually” f(n) and g(n) to see if f(n) has a value different from zero in the position where g(n) has the delta.

This is the reason why we go to the next chapter.

What we will do is to convert the functions f(n) an g(n) to the frequency domain. To do so, we use the Fourier transform.

We start with f(n). We know from signal theory that the Fourier transform of a shifted Dirac delta is:

δ ( n − a ) → e − a j ω (5)

So, the function f(n), in the frequency domain has the form F:

F ( ω ) = ∑ k 1 = 2 k 1 = m + 1 ∑ k 2 = 2 k 2 = m + 1 e − k 1 ⋅ k 2 j ω = e − 2 ⋅ 2 j ω + e − 2 ⋅ 3 j ω + ⋯ + e − 2 ⋅ ( m + 1 ) j ω + e − 3 ⋅ 2 j ω + e − 3 ⋅ 3 j ω + ⋯ + e − 3 ⋅ ( m + 1 ) j ω + ⋯ + e − ( m + 1 ) ⋅ 2 j ω + e − ( m + 1 ) ⋅ 3 j ω + ⋯ + e − ( m + 1 ) ⋅ ( m + 1 ) j ω (6)

We can put above sum in the following form:

= ( e − 2 j ω ) 2 + ( e − 2 j ω ) 3 + ⋯ + ( e − 2 j ω ) m + 1 + ( e − 3 j ω ) 2 + ( e − 3 j ω ) 3 + ⋯ + ( e − 3 j ω ) m + 1 + ⋯ + ( e − ( m + 1 ) j ω ) 2 + ( e − ( m + 1 ) j ω ) 3 + ⋯ + ( e − ( m + 1 ) j ω ) m + 1

As you can see above, each line is a geometric series sum. So, using the known result of geometric series [

= e − 2 j ω 1 − e − 2 m j ω 1 − e − 2 j ω + e − 3 j ω 1 − e − 3 m j ω 1 − e − 2 j ω + ⋯ + e − ( m + 1 ) j ω 1 − e − ( m + 1 ) m j ω 1 − e − ( m + 1 ) j ω = ∑ k = 2 k = m + 1 e − 2 k j ω 1 − e − m k j ω 1 − e − k j ω (7)

For the function g, following the same process:

g ( n ) = δ ( n − p ) (4)

The Fourier transform would be:

g ( n ) = δ ( n − p ) → G ( ω ) = e − p j ω (8)

Now, we get to the point. In the chapter 2, we wanted to perform the following operation:

∑ n = − ∞ n = ∞ f ( n ) ⋅ g ( n ) = ∑ n = 4 n = ( m + 1 ) ( m + 1 ) f ( n ) ⋅ g ( n ) (9)

If the result is different from zero, it means that p is composite, as it means that g(n):

g ( n ) = δ ( n − p ) (4)

Has found another delta in the same position for the function f(n) defined before, that has only deltas in composite number positions.

This operation in the time domain does not have added value (as you have to perform all multiplications), but fortunately Marc-Antoine Parseval [

The general Parseval’s theorem applied to discrete functions (as it is the case) says the following:

∑ n = − ∞ n = ∞ f ( n ) ⋅ g ∗ ( n ) = 1 2 π ∫ − π π F ( ω ) ⋅ G ∗ ( ω ) d ω (10)

The asterisk* means the complex conjugate. In all the functions we are dealing in this paper are real in the time domain so in the left-hand side no conjugation is necessary.

g * ( n ) = g ( n ) (11)

For the right-hand side, yes, we have complex functions. But, as you can check all of them are exponential based. So, the conjugate is just to change the sign of the exponent. This is immediate from Euler’s formula [

G ( ω ) = e − p j ω (12)

G * ( ω ) = e p j ω (13)

So, coming back, this means, we can perform the operation of multiplying point by point the two functions in the time domain, just making the definite integral form −π to π of the multiplication of the two functions (its Fourier Transform) in the frequency domain.

So, the integral in the frequency domain (that represents the multiplication point by point of the functions f(n) and g(n) in the time domain) according Parseval’s theorem is the following (and we will call q to its result):

q = ∑ n = − ∞ n = ∞ f ( n ) ⋅ g * ( n ) = ∑ n = − ∞ n = ∞ f ( n ) ⋅ g ( n ) = 1 2π ∫ − π π F ( ω ) ⋅ G * ( ω ) d ω = 1 2π ∫ − π π ( ∑ k = 2 k = m + 1 e − 2 k j ω 1 − e − m k j ω 1 − e − k j ω ) ⋅ e p j ω d ω = 1 2π ∫ − π π e p j ω ( ∑ k = 2 k = m + 1 e − 2 k j ω 1 − e − m k j ω 1 − e − k j ω ) d ω (14)

So, summing up:

q = 1 2π ∫ − π π e p j ω ( ∑ k = 2 k = m + 1 e − 2 k j ω 1 − e − m k j ω 1 − e − k j ω ) d ω (14)

So, this is the integral we have been talking about from the beginning. Now, you know where it comes from. We will call q the result of above formula. If q is zero, p is prime, if q is different from zero, q has information regarding the number of factors. Let’s comment about it in the following chapters.

Before that, just for possible calculation issues, it is to be noted that as, k is independent from ω the sum can be taken outside the integral, as follows:

q = 1 2π ∫ − π π e p j ω ( ∑ k = 2 k = m + 1 e − 2 k j ω 1 − e − m k j ω 1 − e − k j ω ) d ω = 1 2π ∑ k = 2 k = m + 1 ∫ − π π e p j ω e − 2 k j ω 1 − e − m k j ω 1 − e − k j ω d ω (15)

We know that if p is composite, the number q (result from Equation (15)) is the number of possible combinations of multiplications of two integer numbers that get the value p. And yes, with this number we can get the number of factors that p has.

This is the formula:

q = ( n f 1 + 1 ) ( n f 2 + 1 ) ( n f 3 + 1 ) ⋯ ( n f z + 1 ) − 2 (16)

Being n_{f}_{1} the number of times the factor f1 is repeated, n_{f}_{2} the number of times f2 is repeated and so on.

Putting in another way is:

q + 2 = ( n f 1 + 1 ) ( n f 2 + 1 ) ( n f 3 + 1 ) ⋯ ( n f z + 1 ) (17)

So, the factors of the obtained number q + 2 (much smaller than p) tell us how many factors the number p originally has and how many of them are repeated.

Let’s see with an example. We apply Equation (15) to the number 20 and we get q = 4. So we can check:

q + 2 = 4 + 2 = 6 = ( n f 1 + 1 ) ( n f 2 + 1 ) ( n f 3 + 1 ) ⋯ ( n f z + 1 ) = 3 × 2 = ( 2 + 1 ) ( 1 + 1 ) (18)

This means, p has to have a factor that is repeated twice and one that appears only once. And we see that it is true:

20 = 2 × 2 × 5 (19)

The factor 2 is repeated twice and 5 once.

And the q is 4 because, there are four combinations of multiplications of two integers that get the result 20:

2 × 10 , 4 × 5 , 5 × 4 , 10 × 2

So, everything fits.

Let’s check, other ones:

p = 102

q = 6

q + 2 = 8 = 2 × 2 × 2 = ( 1 + 1 ) ( 1 + 1 ) ( 1 + 1 ) (20)

This means, three factors that are not repeated, and in fact 102 = 2 × 3 × 17.

Another one:

p = 36

q = 7

q + 2 = 9 = 3 × 3 = ( 2 + 1 ) ( 2 + 1 ) (21)

This means two factors repeated twice (each). In fact, 36 = 2 × 2 × 3 × 3.

You can see that the Formula (17) works.

We can use q to know how many factors a number p has if it is composite (or instead, detect it is a prime if q = 0).

One of the problems that this system has is that sometimes there are different solutions for the number of factors. For example, for q = 2, the typical answer is:

q + 2 = 4 = 2 × 2 = ( 1 + 1 ) ( 1 + 1 ) (22)

This means, two different factors not repeated. For example, 21 = 3 × 7 = 7 × 3.

But it could be:

q + 2 = 4 = ( 3 + 1 ) (23)

For example, the number 8 = 2 × 4 = 4 × 2.

It has q = 2 (two combinations of factors) but 8 = 2 × 2 × 2. This means one factor three times, as seen before.

So, the number q could have some values that have different solutions regarding the number of factors.

We will check that the sum and the integral of the Formula (14) are very inefficient computation-wise. And in fact, it is more efficient to start looking for factors (by brute-force) than applying the formula. You can see this easily with the Matlab program (

If we check with different numbers, we compare the efficiency of each method (as time taken is recorded).

For the following examples, I will use a Windows 10 OMEN by HP Laptop 17-an0xx Intel-Core i7-7700HQ 2.80 GHz 32 Gb RAM Nvidia GeForce GTX 1070 with the program Matlab R2018b.

For example, with p = 20:

With p = 103:

For p = 300:

We can see that for p = 300, it has taken 12.25 seconds to discover that has 16 permutations of two factors. Which leads to q + 2 = 18 = ( 2 + 1 ) ( 2 + 1 ) ( 1 + 1 ) .

This means that has three factors (and two of them are repeated twice). (In fact, these are = 2 × 2 × 3 × 5 × 5).

But with brute-checking it took zero seconds to discover it was composite and even it has given the info of which is one of the factors (the factor 2).

Regarding this point a very detailed study should be done. You can check in the Matlab program that I have reduced the precision of the integral to increase efficiency. I have reduced the precision of 0.24, which can be considered high, but it is sufficient for low values of p.

You can change and play with the value here:

a = integral(fun,-pi,pi,’AbsTol’,0.24);

Also, I have considered implicitly that q is considered to be zero when q < 0.5 (using the function “round”).

In the chapter 2 we have put all the Dirac deltas as unitary Dirac deltas. But we can introduce more information, if instead of putting unitary Dirac deltas, we introduce the deltas multiplied by a number that represents the value of the factors you are using. This means, as an output we can get info regarding the factors of the number p (not only the quantity of factors but its sum).

We can check an example (see

So, in this case:

f ( n ) = ∑ k 1 = 2 k 1 = m + 1 ∑ k 2 = 2 k 2 = m + 1 e k 1 e k 2 δ ( n − k 1 ⋅ k 2 ) = ∑ k = 2 k = m + 1 ( e 2 e k δ ( n − 2 ⋅ k ) + e 3 e k δ ( n − 3 ⋅ k ) + e 4 e k δ ( n − 4 ⋅ k ) + ⋯ + e n − ( m + 1 ) e k δ ( n − ( m + 1 ) ⋅ k ) ) = e 2 + 2 δ ( n − 2 ⋅ 2 ) + e 2 + 3 δ ( n − 2 ⋅ 3 ) + ⋯ + e 2 + ( m − 1 ) δ ( n − 2 ⋅ ( m + 1 ) ) + e 3 + 2 δ ( n − 3 ⋅ 2 ) + e 3 + 3 δ ( n − 3 ⋅ 3 ) + ⋯ + e m + 1 + m + 1 δ ( n − ( m + 1 ) ⋅ ( m + 1 ) ) (25)

To calculate Fourier transform:

F ( ω ) = ∑ k 1 = 2 k 1 = m + 1 ∑ k 2 = 2 k 2 = m + 1 e k 1 e k 2 e − k 1 · k 2 j ω = e 2 + 2 e − 2 ⋅ 2 j ω + e 2 + 3 e − 2 ⋅ 3 j ω + ⋯ + e 2 + ( m − 1 ) e − 2 ⋅ ( m + 1 ) j ω + e 3 + 2 e − 3 ⋅ 2 j ω + e 3 + 3 e − 3 ⋅ 3 j ω + ⋯ + e 3 + m + 1 e − 3 ⋅ ( m + 1 ) j ω + ⋯ + e m + 1 + 2 e − ( m + 1 ) ⋅ 2 j ω + e m + 1 + 3 e − ( m + 1 ) ⋅ 3 j ω + ⋯ + e m + 1 + m + 1 e − ( m + 1 ) ⋅ ( m + 1 ) j ω

Calculating the geometric series result for each line:

e 2 e − 2 j ω 1 − e m − 2 m j ω 1 − e 1 − 2 j ω + e 3 e − 3 j ω 1 − e m − 3 m j ω 1 − e 1 − 2 j ω + ⋯ + e m + 1 e − ( m + 1 ) j ω 1 − e m − ( m + 1 ) m j ω 1 − e 1 − ( m + 1 ) j ω = ∑ k = 2 k = m + 1 e k e − 2 k j ω 1 − e m − m k j ω 1 − e 1 − k j ω = ∑ k = 2 k = m + 1 e k ( 1 − 2 j ω ) 1 − e m − m k j ω 1 − e 1 − k j ω (26)

q 2 = 1 2π ∫ − π π e p j ω ( ∑ k = 2 k = m + 1 e k ( 1 − 2 j ω ) 1 − e m − m k j ω 1 − e 1 − k j ω ) d ω = 1 2π ∑ k = 2 k = m + 1 ∫ − π π e p j ω e k ( 1 − 2 j ω ) 1 − e m − m k j ω 1 − e 1 − k j ω d ω (27)

We call q_{2} this value that has this information regarding the factors. We will see how to use it in the next chapter.

One of the problems that this form has is that the exponentials ek and em could go high very quick. A way to avoid this, is to use a “calibration factor” c. This factor, will reduce this exponentials value not reducing the information. This factor should be of the order of p, and normally using the value p works well. This we will see later. First, the calculation (similar to above but with the calibration factor c included).

F ( ω ) = ∑ k 1 = 2 k 1 = m + 1 ∑ k 2 = 2 k 2 = m + 1 e k 1 c e k 2 c e − k 1 ⋅ k 2 j ω = e 2 + 2 c e − 2 ⋅ 2 j ω + e 2 + 3 c e − 2 ⋅ 3 j ω + ⋯ + e 2 + ( m − 1 ) c e − 2 ⋅ ( m + 1 ) j ω + e 3 + 2 c e − 3 ⋅ 2 j ω + e 3 + 3 c e − 3 ⋅ 3 j ω + ⋯ + e 3 + m + 1 c e − 3 ⋅ ( m + 1 ) j ω + ⋯ + e m + 1 + 2 c e − ( m + 1 ) ⋅ 2 j ω + e m + 1 + 3 c e − ( m + 1 ) ⋅ 3 j ω + ⋯ + e m + 1 + m + 1 c e − ( m + 1 ) ⋅ ( m + 1 ) j ω

Calculating the geometric series result for each line:

e 2 c e − 2 j ω 1 − e m c − 2 m j ω 1 − e 1 c − 2 j ω + e 3 c e − 3 j ω 1 − e m c − 3 m j ω 1 − e 1 c − 2 j ω + ⋯ + e m + 1 c e − ( m + 1 ) j ω 1 − e m c − ( m + 1 ) m j ω 1 − e 1 c − ( m + 1 ) j ω = ∑ k = 2 k = m + 1 e k c e − 2 k j ω 1 − e m c − m k j ω 1 − e 1 c − k j ω = ∑ k = 2 k = m + 1 e k ( 1 c − 2 j ω ) 1 − e m c − m k j ω 1 − e 1 c − k j ω (28)

q 3 = 1 2π ∫ − π π e p j ω ( ∑ k = 2 k = m + 1 e k c ( 1 − 2 j ω ) 1 − e m c − m k j ω 1 − e 1 c − k j ω ) d ω = 1 2π ∑ k = 2 k = m + 1 ∫ − π π e p j ω e k c ( 1 − 2 j ω ) 1 − e m c − m k j ω 1 − e 1 c − k j ω d ω (29)

This factor q_{3} is equivalent (has the same information) as q_{2} but reducing the exponentials value, so it reduces the computing necessities.

We see what to do with them, in the next chapter.

There are two cases where with all this information, it is immediate to calculate the factors of a number. One of the cases is trivial. When q = 1, it means that p is a perfect square, so you can just make the square root to get it.

But there is another special case. When q = 2, it means that the number is composite but only by two factors (two prime factors). This case is used for example in RSA encryption [

What you can do in this case is the following.

− First you calculate the q. And you see that is 2, that corresponds to (1 + 1)(1 + 1). This means, two different factors. So, you can apply the following.

− Then you calculate the q_{2} according (27). Or calculate q_{3} according (29).

− Calculate the following number using q_{2}:

d = L n ( q 2 2 ) + 2 (30)

Or if you have calculated q_{3}:

d = L n ( q 2 2 ) ⋅ c + 2 (31)

Being c the calibration factor you have chosen.

− And, then solve the following equation system (being a and b the unknown factors of p) and d is the known number calculated before:

a ⋅ b = p (32)

a + b = d (33)

You have the solution:

b = d + d 2 − 4 p 2 (34)

a = p b = d − b = d − d 2 − 4 p 2 (35)

So, you can get, immediately the factors a and b. This, of course is tricky. As for the calculation of q_{2} you have used exponentials, summations and numerical integrals. So, the complete process, as commented, is at this stage is inefficient.

If you do not believe all this, put this program in your Matlab/Octave (

You can see the following examples result:

Number p = 21:

Number p = 77:

Number 323 is especially painful:

We can see that still the brute-force checking is better computer efficiency-wise than using the numerical integration.

A deeper study shall be done regarding the efficiency of the summations and the integrals. Finding an analytical solution for one of both would be the key.

In the calculation of q_{2}, if use negative exponents for the real part, we could go to a summation that has zero in the infinity for the last element. This means we could simplify the Equation (but no improvement got at this stage).

It could be used the Euler-Maclaurin [

Also, the possibility of making some prework in Equation (1) as the summation is independent of p, should be checked. But regretfully the later integration, element by element, cannot be avoided anyhow at this stage.

In this paper, it has been shown a way of checking if a number is prime or not, using numerical integration in the complex plane. At this stage, this way of calculation is inefficient compared to brute-force checking. Only if in the future an analytical solution for the integral or some prework is done, this efficiency could increase.

Also, it has been used the same method to calculate the factors for the special case where a number is composed by only two factors. Regretfully, again, the procedure is more inefficient than a brute-force checking at this stage. But it opens a new field of calculation.

A deeper study shall be done regarding the efficiency of the summations and the integrals. Finding an analytical solution for one of both would be the key. Some improvements as trying to make the sum to infinity or converting it in an integral via Euler-Maclaurin equation have been discussed. Also, the probability of making some prework in the integral or in the sum before applying to the specific number to be checked shall be studied.

Bilbao, 19th January 2019 (JAMP-v2).

To my family and friends.

The author declares no conflicts of interest regarding the publication of this paper.

Sánchez, J. (2019) How to Check If a Number Is Prime Using a Finite Definite Integral. Journal of Applied Mathematics and Physics, 7, 364-380. https://doi.org/10.4236/jamp.2019.72028