Journal of Integer Sequences, Vol. 14 (2011), Article 11.9.2

A Wieferich Prime Search up to 6.7 × 1015

François G. Dorais
Department of Mathematics
University of Michigan
530 Church Street
Ann Arbor, MI 48109

Dominic Klyve
Department of Mathematics
Central Washington University
400 E. University Way
Ellensburg, WA 98926


A Wieferich prime is a prime p such that 2p-1 ≡ 1 (mod p2). Despite several intensive searches, only two Wieferich primes are known: p = 1093 and p = 3511. This paper describes a new search algorithm for Wieferich primes using double-precision Montgomery arithmetic and a memoryless sieve, which runs significantly faster than previously published algorithms, allowing us to report that there are no other Wieferich primes p < 6.7 × 1015. Furthermore, our method allowed for the efficent collection of statistical data on Fermat quotients, leading to a strong empirical confirmation of a conjecture of Crandall, Dilcher, and Pomerance. Our methods proved flexible enough to search for new solutions of ap-1 ≡ 1 (mod p2) for other small values of a, and to extend the search for Fibonacci-Wieferich primes. We conclude, among other things, that there are no Fibonacci-Wieferich primes less than p < 9.7 × 1014.

Full version:  pdf,    dvi,    ps,    latex    

(Concerned with sequences A001220 A014127 A123692 A123693.)

Received June 30 2011; revised version received September 12 2011. Published in Journal of Integer Sequences, October 16 2011.

Return to Journal of Integer Sequences home page