A Wieferich Prime Search up to 6.7 × 10^15

Document Type


Department or Administrative Unit


Publication Date



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.


This article was originally published in Journal of Integer Sequences. The full-text article from the publisher can be found here.

Due to copyright restrictions, this article is not available for free download from ScholarWorks @ CWU.


Journal of Integer Sequences


© The Author(s) 2011