# Rare interesting primes such as Wolstenholme and Wieferich primes

Take a look at the following two examples of "rare interesting primes";

Wolstenholme prime is a special prime number related to a stronger version of Wolstenholme's theorem. They have connections to Fermat's last theorem. The only known such primes are $$16843$$ and $$2124679$$, but it is believed (conjectured) that there are infinitely many. The corresponding OEIS sequence is A088164.

Definition. A Wolstenholme prime is a prime number $$p > 7$$ that satisfies the congruence

$$\left(\begin{array}{l}2 p-1 \\p-1\end{array}\right) \equiv 1 \quad\left(\bmod p^{4}\right).$$

Wieferich prime is a prime number related to a stronger version of Fermat's little theorem. They appear in works pertaining to Fermat's last theorem. The only known such primes are $$1093$$ and $$3511$$, but it is believed that there are infinitely many. The corresponding OEIS sequence is A001220.

Definition. Wieferich prime is a prime number $$p$$ such that $$p^2$$ divides $$2^{p − 1} − 1$$.

I was wondering,

Question. Are there any other types of "rare interesting primes"? I.e. primes related to known results in number theory and have been studied (there exist compelling references, i.e. such primes are "interesting"), but do not have many examples (are "rare").

For non-example, Twin primes are "interesting", but are not "rare" since one can easily list say $$10^4$$ examples.

For example, Fermat primes are "interesting" and are "rare". Only known are $$3, 5, 17, 257, 65537$$. It is conjectured that these are the only terms (unlike the Wolstenholme and Wieferich primes).

Another example may be of Mersenne Primes. We can list around $$50$$ examples at the moment, where the largest example holds the current record for the largest prime.

Are there any other examples?

• Wilson primes, $(p-1)! \equiv -1 \pmod{p^2}$. Only three found so far, $5,13,563$. – Daniel Fischer Aug 14 at 12:34
• Wall sun sun primes , infinite many expected although none known. – Peter Aug 14 at 12:40
• Of great interest are surely also the factorial and the primorial primes. – Peter Aug 14 at 12:41
• Rep-unit primes also come in my mind. Only a "handful" are known. – Peter Aug 14 at 12:45
• I suggest to post an answer as "community" and list the examples you know, and everyone can add examples by editing. – Peter Aug 14 at 12:49

$$\begin{array}{lllcc} \text{Name} & \text{Definition, }p\in\mathbb P & \text{Known examples} & \text{No.} & \text{Expected}\\ \hline \text{ Wolstenholme } & \left\{p\gt 7 : \left(\begin{array}{l}2 p-1 \\p-1\end{array}\right) \equiv 1 \left(\bmod p^{4}\right) \right\} & \{16843, 2124679\} & 2 & \text{infinite} \\ \text{ Wieferich } & \left\{ p : p^2 \mid 2^{p − 1} − 1 \right\} & \{1093, 3511\} & 2 & \text{infinite} \\ \text{ Wilson } & \left\{ p : p^2 \mid (p − 1)! + 1 \right\} & \{5,13,563\} & 3 & \text{infinite} \\ \text{ Wall-Sun-Sun } & \left\{ p : p^2 \mid F_{\pi(p)} \right\}^{} & \{\} & 0 & \text{infinite} \\ \text{ Woodall } & \left\{ p : p = 2^nn-1,n\in\mathbb N \right\} & \text{oeis.org/A002234} & 34 & \text{infinite} \\ \text{ Cullen } & \left\{ p : p = 2^nn+1,n\in\mathbb N \right\} & \text{oeis.org/A005849} & 16 & \text{infinite} \\ \text{ Mersenne } & \left\{ p : p = 2^n-1,n\in\mathbb N \right\} & \text{mersenne.org/primes} & 51 & \text{infinite} \\ \text{ Fermat } & \left\{ p : p = 2^{2^n}+1,n\in\mathbb N \right\} & \{3, 5, 17, 257, 65537\} & 5 & 5 \\ \text{ Factorial } & \left\{ p : p = n!\pm1,n\in\mathbb N \right\} & \begin{array}{}\text{oeis.org/A002981},\\\text{oeis.org/A002982}\end{array} & 49 & \text{infinite} \\ \text{ Primorial } & \left\{ p : p = p_n\#\pm1,n\in\mathbb N \right\} & \begin{array}{}\text{oeis.org/A006794},\\\text{oeis.org/A005234}\end{array} & 42 & \text{infinite} \\ \text{ Repunit } & \left\{ p : p = \frac{10^n - 1}{9}, n\in\mathbb N \right\} & \text{oeis.org/A004023} & 9 & \text{infinite} \end{array}$$
$$$$ Wall–Sun–Sun primes - $$F_n$$ are Fibonacci numbers and $$\pi(p)$$ is Pisano period. - [wikipedia]