# A note on the two known Wieferich Primes

By John Blythe Dobson (j.dobson@uwinnipeg.ca)

### Introduction

In a search which began even before its objects had received their modern name, and which has now lasted the better part of two centuries [3], only two primes have ever been found which possess the Wieferich property, that *p*^{2} divides 2^{p} − 2, or in other words, that *p* divides the Fermat quotient ^{p − 1} − 1)/*p*^{15} in [6], with no further examples being found. It is well known [5] that Mersenne primes 2^{q} − 1 and Fermat primes 2^{2n} + 1 cannot have this property, because for such numbers *p* the associated Fermat quotient can be explicitly evaluated in terms of *q* or *n*, respectively, and it does not vanish mod *p*. This idea has been considerably extended in the work of Wells Johnson, especially in a 1978 paper [2] which lies beyond the scope of this note.

### Johnson announces an observation on digital cyclicity

Johnson, in a 1977 paper [1] citing a personal communication from Lawrence Washington, pointed out the repetetiveness of the binary representations of the numbers which are one less than the two known Wieferich primes:

1093 − 1 = 1092 = 10001000100_{2}

3511 − 1 = 3510 = 110110110110_{2},

the cyclicity being imperfect in the case of 1092. Motivated by this observation, a search for “the binary periodic numbers of bit pseudo-length *j* ≤ 3500*k* ≤ 24

### A restatement of Johnson’s announcement

In an attempt to derive a more uniform representation for these numbers, the present writer noticed that the cyclicity becomes perfect when the numeric bases are changed to higher powers of 2, as follows:

1092 = 444_{16}

3510 = 6666_{8}.

These forms, analogous to the repunits, reveal that the numbers can be represented as very small multiples of so-called “reduced Fermatians,” as they were dubbed by James Joseph Sylvester:

1092 = 4 · (16^{3}− 1)/(16 − 1) (base 10)

3510 = 6 · (8^{4}− 1)/(8 − 1) (base 10).

## Postscript (added 6 December 2011)

It has just come to our attention that essentially the same representation of 3510 was given in 2001 by Nico Benschop [8].

This may be significant, because these “reduced Fermatians” (although they do not appear there under that name) play a central role in Johnson’s 1977 paper, in which he showed that they, like the Mersenne and Fermat numbers, cannot have the Wieferich property. Furthermore, he showed that their counterparts with + instead of − signs likewise cannot have the Wieferich property. If we tentatively postulate that a representation of the form

{m· (2^{rs}− 1)/(2^{r}− 1)} + 1, (A)

with *m* necessarily even, is somehow characteristic of the Wieferich numbers, then certain restrictions on the parameters follow easily from the fact that the result cannot itself correspond to a “reduced Fermatian” (or to the counterpart thereof with a + sign). For example, numbers of the form

{2 · (2^{2s}− 1)/(2^{2}− 1)} + 1

can, as is strongly hinted at on p. 198 of Johnson’s paper, be represented as

(2^{2s + 1}+ 1)/(2 + 1)

and so are disqualified as possible Wieferich primes. Similar relationships disqualify the forms in (**A**) in the case *m* = 10 with *r* = 4, and in the case *m* = 42 with *r* = 6; or in general, when

m= 2 · (4^{r/2}− 1)/(4 − 1).

However, for most of the forms represented in (**A**) there is no obvious reason why they should not generate candidate Wieferich primes.

In order for the forms represented in (**A**) to exhibit perfect digital cyclicity, it is obvious that *m* must be strictly less than 2^{r}. With this limitation, instances of primes represented by (**A**) seem rather uncommon. Indeed, if the primes excluded by Johnson’s criteria for *not* having the Wieferich property are removed from the list, the first seven candidates are 293, 439, 547, 1093, 1171, 2341, and 3511, two of which are in fact Wieferich primes. In the interval below 2^{57} (= 144115188075855872) there are only about 83,228 such primes. Clearly, if it could somehow be shown that Wieferich primes must possess the representation shown in (**A**), the labor of testing candidates would be drastically reduced; even more so if a condition could be placed on *m* other than its being even. We should add that although we have obtained *counts* of the forms represented in (**A**), we have not actually undertaken the much more time-consuming task of testing them for the Wieferich property, which would in any case be moot in light of the much more extensive calculations reported in [7].

### The connection to square divisors of Mersenne numbers

Recalling the old and intriguing question whether it is possible for a Mersenne number 2^{p} − 1 (with *p* prime) to have a square divisor, it is known that *p* would have to equal the order or haupt-exponent of 2 *modulo* a Wieferich prime; that is, *p* would be equal to the least value of *h* for which 2^{h} − 1 is divisible by a Wieferich prime *W*, where *h* is some divisor of *W* − 1 [4, 5]. However, for each of the two known Wieferich primes, *h* does not happen to be prime, because the minimal exponents of 2 occur with 1093^{2} | 2^{364} − 1 and 3511^{2} | 2^{1755} − 1. The failure of the known Wieferich primes W to divide a Mersenne number of prime exponent may thus be characterized as an insufficiency of values of *k* for which 2 is a *k*-ic*mod* W); for example 1093 fails at the most basic level by not having 2 as a quadratic power residue, causing the order of 2 to be even and therefore not prime. If the numbers which are one less than a Wieferich prime are indeed constrained by the representation shown in (**A**), they would be much rounder (*i.e.* possess more divisors) than normal, requiring the existence of many values of *k*, and consequently forcing *p* to be a relatively small divisor of W − 1. So although a proof of the necessity of (**A**) would still be far from a proof (if such exists) of the squarefreeness of Mersenne numbers of prime exponent, it would at least provide an heuristic explanation of the failure to-date of the very extensive Mersenne factorization projects to discover any square divisors. For further discussion of this subject see our note On square divisors of Mersenne numbers.

### An unexpected property of the divisor-sums

In the spirit of the observation made thirty years ago by Lawrence Washington and communicated through Wells Johnson, we close with one of our own — which may or may not be of any importance — concerning the numbers which are one less than the two known Wieferich primes. These two numbers share the common divisor 2·3·13 = 78, and it is a somewhat curious fact in itself that this number is so large. Now if *n*)*n*, then

σ(1092) = 3136 = 112/39 · 1092

σ(3510) = 10080 = 112/39 · 3510.

It is a surprising coincidence that the ratios between each of these numbers and their respective divisor-sums should be precisely the same. The literature contains divisor-sum formulae which bear a tenuous resemblance to Fermat-quotient formulae, but we have not seen anything which might explain this phenomenon.

## References

1. W. Johnson, “On the nonvanishing of Fermat quotients (mod *p*),” *Journal für die Reine und Angewandte Mathematik* 292 (1977): 196-200. Available online at http://www-gdz.sub.uni-goettingen.de/cgi-bin/digbib.cgi?PPN243919689_0292.

2. Wells Johnson, “On the *p*-Divisibility of the Fermat Quotients,” *Mathematics of Computation* 32 (1978): 297-301.

3. J. Knauer and J. Richstein, “The continuing search for Wieferich primes,” *Mathematics of Computation* 74 (2005): 1559-1563.

4. A. Rotkiewicz, “Sur les nombres de Mersenne dépourvus de diviseurs carrés et sur les nombres naturels *n* tels que *n*^{2} | 2^{n} − 2,” *Matematički Većnik* / *Matematicki Vesnik* 2(17) (1965): 78–80. We first learned of this little-known paper through various writings of Paulo Ribenboim.

5. Le Roy J. Warren and Henry G. Bray, “On the Square Freeness of Fermat and Mersenne Numbers,” *Pacific Journal of Mathematics* 22 (1967): 563–4. Available online at http://projecteuclid.org/handle/euclid.pjm/1102992105.

6. F.G. Dorais and D.W. Klyve, Near Wieferich Primes up to 6.7 × 10^{15} [PDF]. Dated November 27, 2008. Available online at http://www-personal.umich.edu/~dorais/docs/wieferich.pdf.

7. Jan Dobeš & Miroslav Kureš, “Search for Wieferich primes through the use of periodic binary strings,” *Serdica Journal of Computing* 4 (2010): 293–300. We are grateful to Toshio Yamaguchi for supplying a copy of a preprint of this paper. The project has a Statistics page at http://www.elmath.org/index.php?id=statistics.

8. Nico Benschop, Mersenne primes — meet Wieferich primes [PDF]. Posting to The Math Forum @ Drexel, dated 21 May 2001. Available online at http://mathforum.org/kb/message.jspa?messageID=313601.

First published 2 August 2007

With minor revisions through to 6 December 2011