1. Introduction
There exist different primality test [1,2]. The most simple is to check all the divisors of a given number N. If the number has some divisor with remainder 0, then the number is not prime. Another method uses the Wilson Theorem, but it is quiets inefficient. Some methods certificate the primality with some probability. Those methods can assure certify always if a number is prime and in some case certify than a number is prime even if it is not. Those methods take a value a from a set previously calculated. One example is the Miller Rabin Test. Given a number n, we choose a number a and state the even number with s positive integer and d positive odd integer. If (mod n) and (mod n) the number is composite. As deterministic, the most successful algorithm is the Manindra Agrawal, Neeraj Kayal, and Nitin Saxena Test [3]. The algorithm is based on the equation mod mod p for a, p prime and for each x. They were able to reasonably speed up the expansion of the binomial terms. To do this they state that the formula is valid also for the polynomial divided by with r small prime: mod mod. In this way the remainder has only r + 1 terms.
An Equation for Not Prime
The algorithm is based on the fact that a number is not prime when is even or when it has a form of the kind where n is the generated number, p is an integer prime and. Therefore it is necessary to solve the equation
(1)
with variable p that gives the positive solution
(2)
In general we have
(3)
If k is an integer for a certain prime the number is generated. The set of primes is in the set of odds. If a condition is valid for the odds we can assert that it is valid for the prime and therefore if k is integer for an odd number is integer for a prime and therefore the number is generated.
2. Method
It is based on statement (3)
number isprime isprime = true if number mod 2 == 0 then isprime = false
end if
for odd = 3, And, odd = odd + 2 if integer then isprime = false
end if
end for
return isprime.
3. Computational Complexity
The method requires.
4. Results
The test has been done with
• Asus notebook
• Intel i7 processor
• 4 GB Ram
• Java Programming Language
• Windows 7 OS For the number 99999989 that is prime the result is run: true BUILD SUCCESSFUL (total time: 0 seconds).
Not counted by the machine as significative.
5. Discussion
If we apply L’Hopital’s rule [4] for the asymptotic analysis with as confront term. We obtain derivative ratio
where c is a constant value, so applying again L’Hopital’s rule the ratio became and applying again that goes to zero for x that goes to infinity. The result is not asymptotically better than, if we estimate the plot of the two functions we reach the asymptotic cross-over after the interval [2, 192823208].