1

fermat test says :

if $a^{N-1} \equiv 1 \pmod N$, then N is probably prime number, but according to pocklington primality test if:

$3^{N-1} \equiv 1 \pmod N $, then N is proven prime, where $N=2p+1$, and p is prime, proof :

if $N=2p+1$ then gcd$(3^{\frac{N-1}{p}} -1,N)=1$, but $3^{N-1} \equiv 1 \pmod N $, then $N$ is prime by pocklington primality test.

but my question is, is there any deterministic versions of fermat test except this one ?

  • The Adleman Pomerance Rumely test is deterministic and the main idea is , as in almost all primality tests, the Fermat test. Pocklington only works if special conditions are satisfied. It depends on the kind of numbers, which tests we have. Lucas Lehmer for Mersenne numbers, Pepins test for Fermat numbers and for Proth numbers, we also have a special deterministic test (I do not remember the name in this case) – Peter Feb 25 '20 at 14:37
  • 2
    @Peter thank you for this comment sir, but what I meant is, is there any other form of numbers except the above form, that could be proved to be prime only by passing fermat test ? – عبد الرحمن رمزي محمود Feb 25 '20 at 14:47
  • So, what you ask is , for which numbers is , lets say , $$2^{n-1}\equiv 1\mod n$$ sufficient for the primality of $\ n\ $ ? If we want to have it for every base $\ a\ $ coprime to $\ n\ $, this will almost never work. – Peter Feb 25 '20 at 14:51
  • 1
  • 1
    fyi: there is a simple deterministic primailty test based on little Fermat but it is not very practical. – Bill Dubuque Feb 25 '20 at 18:01
  • 1
    @BillDubuque thank you for your help sir, I already know lucas primality test, but I was wondering if there is any form of numbers that only requires one modular experimentation to prove that it's prime or not, except the above form ? – عبد الرحمن رمزي محمود Feb 26 '20 at 18:28

2 Answers2

1

Comment on your question/proof, $p$ must be prime, not just probable prime for the test to work!

Are there similar tests?

The Proth Test works for numbers $n=h2^k+1$ where $h < 2^k$. Find an integer $(a | n)=-1$ (Jacobi symbol), and $n$ is prime if and only if:

$a^{(n-1)/2}=-1\pmod n$

There is a similar test if $n=hq^k+1$ where $h < q^k$ and $q$ is prime:

$a^{(n-1)}=1\pmod n$

$\gcd(a^{(n-1)/q}-1,n)=1$

J. Linne
  • 3,228
0

I wrote a short note, Industrial Grade Primes with a Money-Back Guarantee (Crux Mathematicorum 34/3 (2008): 165-169), in which I show that if $p$ and $q$ are odd primes such that $(p-2)/2 < q < 2(p+1)$, then $n = 2pq + 1$ is prime if and only if Fermat's Little Theorem (for $n$) holds.

As I comment in that paper, this result is not practical for generating primes because you need 2 primes to generate one new one, but I have never seen a similar theorem that exhibits a class of integers that is provably prime if and only if Fermat's Little Theorem holds.

Glorfindel
  • 4,000