

"Dr. John Cosgrave's talk on number theory was for many people the best thing they've been to all year. He gave a wonderfully lucid
account of his recent discoveries and ideas about Fermat numbers  accessable to all & extremely interesting for those of us (i.e. everyone)
who hasn't actually seen a number theorist at work. The talk [which was about the Fermat 6 work on this page] actually managed to
stretch on for more than two (very short & extremely enjoyable) hours, and it was well after twelve [midnight] before we let him leave
the maths department."
(Quoted from the Trinity College Dublin (Student) Mathematical Society web site.
Thank you to whoever wrote the above; no bribes were offered!)
Note of April 2021 I am currently trying to improve this page, after a gap of more than twenty years...
What is this page about? It's about my response the (unanswered) question: How many Fermat primes are there?
This page contains material relating to an email which I sent to the
Number Theory mailing list
on 5^{th} October 1999, following a
question posted by Mingzhi Zhang
on 4^{th} October 1999 re primes of the form
(2^{k} + 2^{i} + 1).
Following this I submitted a paper (now, in Sept 2006, available in pdf format:
Fermat_6),
'Could there exist a sixth Fermat prime? I believe it is not impossible',
to the American Mathematical Monthly on 19^{th} March 1999, and it was rejected.
I have been asked why did I not submit it elsewhere, and the simple answer is that I lacked the emotional energy to do so; my paper made a certain
obvious and elementary point, which some open minded people listened to respectfully, while others didn't.
The email of 20^{th} March 1999 in which I made an announcement to a few friends and colleagues about my (new, I then thought;
see later) unification of Fermat and Mersenne numbers :
From: John B. Cosgrave
To: ...
Subject: a unification of Mersenne and Fermat numbers
Date: 20 March 1999 22:36
Dear Colleagues (and, in some cases, friends),
I am writing to tell you of some work I have done in recent weeks, which, in a way, unifies into a whole the Fermat and Mersenne numbers. This work may (actually, should) throw doubt on the frequent assertion that the only Fermat primes are the first five (3, 5, 17, 257 and 65537). That was not, of course, what I set out to do; rather I was just making some routine preparations for my third year Number Theory and Cryptography course (in connection with improving the statement of Proth's theorem, and its proof, so as to make it more accessible to my students), when a number of things took a turn ... (the actual details are in a paper that I have just completed, and submitted. Added later: it's the Fermat_6 paper above).
Here, then, is my discovered linking of the Mersenne and Fermat numbers (if it is already buried out there in the literature, then obviously I apologise
for wasting your time in reading this, and I end up with egg on face. Anyway, at the age of 53 I am not worried anymore about making a fool of myself):
The Mersenne numbers are the M_{p} = 2^{p}  1, p prime; the Fermat numbers are the
F_{n} = 2^{2n} + 1, n = 0, 1, 2, 3, 4, 5, ... .
Currently there are 37 Mersenne primes (the last three found by George Woltman's wonderful
GIMPS project,
and there are only 5 known Fermat primes (3, 5, 17, 257 and 65537, from n = 0, 1, 2, 3, 4).
I propose (as a pictorial image) that instead of thinking of those two sequences horizontally (as it were), one should see the Fermat numbers as being the vertical side, and the Mersenne numbers the horizontal side of this doubly infinite matrix of numbers:
. . .
('level' 3) F_{3, 1}, F_{3, 2},
F_{3, 3}, F_{3, 4}, ...
('level' 2) F_{2, 1}, F_{2, 2},
F_{2, 3}, F_{2, 4}, ...
('level' 1) F_{1, 1}, F_{1, 2},
F_{1, 3}, F_{1, 4}, ...
('level' 0) F_{0, 1}, F_{0, 2},
F_{0, 3}, F_{0, 4}, ...
('rank' 1) ('rank' 2) ('rank' 3) ('rank' 4) ...
where the left vertical side is comprised of the Fermat numbers (F_{n,1} := F_{n},
n = 0, 1, 2, 3, 4 ... ),
the bottom horizontal side is comprised of the Mersenne numbers
F_{0, r} := M_{p}, p the r^{th} prime), and the general entry
F_{n, r} is given by the value of the cyclotomic polynomial
(x^{p1} + x^{p2} + ... + x + 1), evaluated at
x = 2^{pn}.
Thus the 'ranks' are comprised of the numbers:
rank 1: 2^{2n} + 1 (n = 0, 1, 2, 3, 4, ... ), the Fermat numbers,
rank 2: 2^{2.3n} +
2^{3n}
+ 1 (n = 0, 1, 2, ... ),
rank 3: 2^{4.5n} +
2^{3.5n} +
2^{2.5n} +
2^{5n}
+ 1 (n = 0, 1, 2, ... ), (n = 0, 1, 2, ... ),
...
The numbers at level 0 are the numbers {F_{0, r}}, with
F_{0, r} = 2^{p  1} + 2^{p  2} + ... + 2 + 1 = 2^{p}  1,
and thus are the Mersenne numbers.
The numbers at level 1 (I like to think of them as being the first cousins of the Mersenne numbers) are given by
F_{1, r} = 2^{p.(p1)} +
2^{p.(p2)} +
2^{p.(p3)} + ...
+ 2^{p} + 1
= (2^{p2}  1) / (2^{p}  1)
These {F_{n, r}} are the (proposed) generalised Fermat numbers; (though it might be better to call them the MersenneFermat numbers?), and are quite different from the already named generalised Fermat number (as in, e.g., Hans Riesel’s Prime Numbers and Computer Methods of Factorization),
namely the
F_{n}(a, b) =
a^{2n} + b^{2n},
with gcd(a, b) = 1, and a, b of opposite parity.
The proposed F_{n, r} have the following (easily proved) properties:
1. They satisfy a functional equation
(similar to the classic Fermat
F_{0} . F_{1} . F_{1}. ... . . F_{n1} + 2 =
F_{n}). ≠
2. They are pairwise relatively prime (within and across the ranks, meaning:
gcd(F_{n, i}, F_{n, j}) = 1, for i ≠ j,
and
gcd(F_{m, i}, F_{n, j}) = 1, for m ≠ n),
3. (the most interesting/significant one, in view of the fact that the Fermat numbers  as known  all pass the LucasFermat test to the base 2, and indeed the same was known of the Mersenne numbers).
Every F_{n, r} passes the LucasFermat test to the base 2.
And here, now, is how some considerable doubt must be cast over the belief/assertion that the Fermat numbers are all composite after the 5^{th} of them. That belief may be equivalently restated as follows:
a Fermat composite CANNOT be followed by a Fermat prime
(meaning: if F_{n} is composite then F_{n+1} CANNOT be prime)
But the Fermat numbers are simply the left vertical side of the above doublyinfinite square, and what about the next rank along from it?, and the one alongside it?, and ... . Those numbers (in each rank) are like the Fermat numbers (the only difference is that they grow  of course  so much more quickly in size:
F_{5} = F_{5, 1} = 2^{25} +1 = 2^{32} + 1, has 10 digits,
F_{5, 2} has 147 digits, F_{5, 3} has 3763 digits, F_{5, 4} has 30357 digits,
F_{5, 5} has 484812 digits, ... ).
Now, my main point: Will anyone who holds to the common orthodoxy that there is no Fermat prime after the fifth (reminder: equivalent to the above a Fermat composite CANNOT be followed by a Fermat prime), will such a person not also maintain  by simple analogy  that for each of those ranks a prime (in that vertical rank) may not follow a composite in that same rank?
Meaning if F_{n, r} is composite, isn't F_{n, r+1} also composite?
But I have found (there is a caveat, below) that at the 17^{th} rank, where F_{0, 17} is
M_{59}, and, as is known M_{59} = 2^{59}  1, is composite, and is followed by the 1031 digit prime (see email from F. Morain below) F_{1, 17}.
I have not been able to prove that F_{1, 17} is prime by a classical method (say Pocklington, or Selfridge’s ‘change of base theorem’), and those of you who are familiar with such methods will immediately see why (I have explained this point in my paper). Maple (which I use) declares F_{1, 17} to be prime, but as you will know that cannot be relied upon for a number of 1031 digits. F_{1, 17} passes the LucasFermat test to all prime bases up to 137 (I had to stop somewhere), and passes Miller's test for the first 25 primes (again I had to stop somewhere), and so is almost certainly prime (if not it will be the first counterexample to the Maple test; but no consolation!!) I have pointed all of this out to the Editor of the journal to which I have submitted my paper, and will (if he is agreeable) submit a request about proving (or disproving) primality to the Number Theory List. In the meantime I would ask you to regard all of the above as being a private communication.
I hope it has been of some interest to you.
With best wishes,
John
1. An email from Francois Morain:
From: Francois Morain
To: John Cosgrave
Subject: Re: a unification of Mersenne and Fermat numbers
Date: 25 March 1999 17:04 F[1,17] is prime. It took less than two days on a DecAlpha 500 MHz (V5). The certificate is available on request.
F. Morain
2. A later email from me:
From: John B. Cosgrave
Subject: a conjectured primality test for Mersenne primes
Date: 13 April 1999 08:38
Dear Colleagues/Friends,
I am writing to all of you since many of you commented in some way on my recent
circular note re a unification of Mersenne and Fermat numbers.
I am now circulating the following, just discovered (rediscovered?  please inform me if you think so, and I will just give up), conjectured primality test for Mersenne primes:
Let p be an odd prime, then M_{p} = 2^{p}  1 is prime if and only if
3^{((Mp  1)/p)} = 2^{a} (mod M_{p}), for some integer a in the interval [0, p  1].
One way is trivial, namely:
if M_{p} is prime then 3^{((Mp  1)/p)} = 2^{a} (mod M_{p}), a in the interval [0, p  1],
and I will not offend readers with a proof. I tested the converse for primes up to 50,000 and the above conjecture held good (but, as Daniel Shanks might well remark: 50,000 is a long way from infinity).
What makes me a little hesitant about the above is the part played by '3', because, if one replaces '3' with (nonpowers of 2, for obvious reasons) 5, 6, 7, 9, 10, 11, ... (to where?), then the corresponding test also seems to hold good.
With best wishes, John
Finally, I received some friendly communications in connection with this, but eventually a rejection of my paper by the Monthly. I also received some ignorant and offensive comments: one, in particular, from someone (wellknown) who thought it was obvious that there didn't exist a sixth Fermat prime, and told me that I simply didn't understand probability arguments. I just love that: here we are, professional mathematicians, who pride ourselves on proof, and some of us think that certain matters are obvious. Oh, and another person to whom I had written (and praised his book on...) and asked if he would kindly send me some copies of his papers, replied that he only sent his papers to professional mathematicians.
 
