View Single Post
Old 2017-07-11, 13:59   #1
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

334910 Posts
Default A note on small factors of Fermat numbers

What with all the recent discussion of LL and Pepin's tests (and ignis fatuus implementations of them), I thought I'd mention a (small) class of primes which admit extremely short primality proofs, whose validity can be seen in a very elementary way. I make no claim of originality. In fact, I am quite sure that this is something that has been known for a very long time. But it may be deserving of wider notice, so here goes...

Tantalizingly, for each prime p there is a short primality certificate:

In Very Short Primality Proofs, Carl Pomerance gives the LL test for Mersenne primes and Pepin's test for Fermat primes as examples of proofs that p is prime, involving O(log2(p)) multiplications. He shows [Theorem 1] that, for each prime p, there is a primality proof requiring (5/2 + o(1))log2(p) multiplications mod p.

Unfortunately, the proof uses deep results on elliptic curves over finite fields. Also, there is no general way of finding such a short proof in a reasonable length of time.

Alas, Mersenne primes are quite rare, and (as Pomerance notes) it is widely thought that there are only finitely many Fermat primes.

However, there is are very short primality proofs for some factors of composite Fermat numbers. Although AFAIK there are not known to be infinitely many factors of the right type, the first factors yet to be found of most composite Fermat numbers will likely fill the bill.

I am sure this has been known for a long, long time. The first inkling that something unusual was afoot came to me when I was perusing Mathematical Recreations by Maurice Kraitchik. It had a table with known factors of Fermat numbers. The largest Fermat number in the table was F73, with the factor 5*275 + 1. As listed in Prime factors k*2n + 1 of Fermat numbers Fm and complete factoring status, this factor was found in 1906 by J. C. Morehead. Given that year, computational means must have been quite limited.

At the time I saw this, I was fairly young, and my grasp of number theory was only elementary, including Fermat's "little theorem" and some basic consequences. But that was enough to inform me that the fact that p = 5*275 + 1 divides F73, actually proves that p is prime! At the time, this struck me as extremely funny, given the enormous size of F73. But, of course, using mod p arithmetic, the divisibility is easy to prove. We now give the very easy proof that the divisibility is also a primality proof. We use the following result of Lucas:

Let n > 1, and let p be a prime divisor of Fn. Then p == 1 (mod 2n+2).

The exponent n + 1 follows almost immediately from Fermat's "little theorem;" Lucas obtained the increase to n+2 by observing that for n > 1, 2 is a quadratic residue (mod p).

We then have the following result:

Let p = k*2n+2 + 1 divide Fn. If k < 2n+2 + 2, then p is prime.

The proof is very simple. If p is composite and divides Fn, its prime factors q are all congruent to 1 (mod 2n+2). Consequently,

p \ge (2n+2 + 1)2 = (2n+2 + 2)*2n+2 + 1, so k \ge 2n+2 + 2, and the proof is complete.

This gives a primality proof of p involving n squarings (mod p); n < n + 2 + log2(k) < log2(p).

Last fiddled with by Dr Sardonicus on 2017-07-11 at 14:07
Dr Sardonicus is offline   Reply With Quote