Let every prime of the form $2^n+1$ be called "Fermat Prime" (I know that the real definition is by using $2^{2^{n}}+1$, but I will use the other one to get things easier). By definition, we have that $p$ will be a Fermat Prime if and only if it is prime and it is not of the form $qn+1$ for any prime $q$ such that $2<q<p$.

Then, by Dirichlet Theorem on arithmetic progressions, we have that, as $N \to \infty$, the number of primes of the form $qn+1$ lower than $N$ will tend to be the same than the one of primes of the form $qn+2$ and of the one of the primes of the form $qn+3$; and like this up to $qn+(q-1)$.

So, to know the number of Fermat Primes as $N \to \infty$, we have that:

  1. Only the primes of the form $3n+2$ can be a Fermat Prime. Then, as $N \to \infty$, The number of FM will be lower than $\pi(N)\frac{1}{2}$.

  2. Only the primes of the form $5n+2, 5n+3$ and $5n+4$ can be a Fermat Prime. Then, as $N \to \infty$, The number of FM will be lower than $\pi(N)\frac{1}{2}\frac{3}{4}$.

  3. ...

If we continue like this, we would get that: $$\lim_{N \to \infty}\pi_{\text{FermatPrimes}}(N)=\lim_{N \to \infty} \pi(N)\prod_{p>2}\frac{p-2}{p-1}=K \lim_{N \to \infty} \frac{\pi(N)}{\log{(N)}}$$

Which clearly diverges.

Is this true?

  • $\begingroup$ In your notation, Euler proved that factors are of the form $2q n+1$ and Lucas that they are of the form $4 q n+1$. These are incompatible with your "$qn+1$ for any prime $q$ such that $2<q<p$." $\endgroup$ Dec 4, 2016 at 23:42
  • 1
    $\begingroup$ @Eric But let $p$ be a Fernat Prime. As $p-1=2^n$, the only factor than $p-1$ can have is 2. From here, you get to the conclusion that if a composite number has a divisor ($q$) greater than 2, that number plus 1 cannot be a Fermat Prime $\endgroup$ Dec 4, 2016 at 23:47
  • $\begingroup$ @user3141592 : And how does this make either $2q$ or $4q$ prime, as you have stated? $\endgroup$ Dec 4, 2016 at 23:50
  • $\begingroup$ You actually have made the vacuous statement that the only numbers that can be Fermat primes are Fermat numbers. That is, yes, all Fermat primes are a power of $2$ plus $1$. Of course, all Fermat numbers are a power of $2$ plus one, so you have not said very much. $\endgroup$ Dec 4, 2016 at 23:53
  • $\begingroup$ Additionally, you are doing neither your argument nor your reader any favors by using nonstandard notation. $\endgroup$ Dec 4, 2016 at 23:54

1 Answer 1


Your derivation (or rather, your heuristic, since there are issues of convergence of the limiting process to deal with) only gives necessary conditions for primes to be Fermat primes, not sufficient conditions. Therefore the expression you derive is simply an upper bound, not an asymptotic formula.

  • $\begingroup$ I understand what you mean, but could you give any example of another condition that Fermat Primes should deal with? $\endgroup$ Dec 5, 2016 at 10:05
  • $\begingroup$ Greg, there is nothing wrong with the sieve. A prime is $p$ is a Fermat prime if and only if $2$ is the only prime divisor of $p-1$ if and only if $p\not\equiv1\pmod q$ for any odd prime $q<p$. The explanation, as you implied, probably has something to do with the convergence of the various limiting processes here. For example, it takes time for the Dirichlet densities to average out, and early on there may larger deviations from the average and/or larger deviations from independence. Because those appear as factors here, a handful of factors smaller than the expected $(p-2)/(p-1)$... $\endgroup$ Dec 5, 2016 at 15:30
  • $\begingroup$ (cont'd) may bring the density of Fermat primes to zero. I am too fluish to think straight. I will ask a colleague. $\endgroup$ Dec 5, 2016 at 15:34
  • $\begingroup$ @Greg Thank you very much! I see your point, but I do not understand why are you saying that "it takes time for the Dirichlet densities to average out", as I am working with a limit tending to Infinity. Could you please tell me exactly where is the error in my question? Also, could you explain to me what do you mean with "Problem of convergence"? $\endgroup$ Dec 5, 2016 at 15:38
  • $\begingroup$ @Jyrki Sorry, I did not want to mention Greg but you $\endgroup$ Dec 5, 2016 at 15:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .