The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014127 Mirimanoff primes: primes p such that p^2 divides 3^(p-1) - 1. 41
11, 1006003 (list; graph; refs; listen; history; text; internal format)



Dorais and Klyve proved that there are no further terms up to 9.7*10^14.

These primes are so named after the celebrated result of Mirimanoff in 1910 (see below) that for a failure of the first case of Fermat's Last Theorem, the exponent p must satisfy the criterion stated in the definition. Lerch (see below) showed that these primes also divide the numerator of the harmonic number H(floor(p/3)). This is analogous to the fact that Wieferich primes (A001220) divide the numerator of the harmonic number H((p-1)/2). - John Blythe Dobson, Mar 02 2014, Apr 09 2015

The prime 1006003 was apparently discovered by K. E. Kloss (cf. Kloss, 1965) according to various sources. - Felix Fröhlich, Dec 08 2020

If there is no term other than 11 and 1006003, then the only solution (a, w, x, y, z) to the diophantine equation a^w + a^x = 3^y + 3^z is (5, 1, 1, 2, 3) (cf. Scott, Styer, 2006, Lemma 12). - Felix Fröhlich, Dec 10 2020

Named after the Russian mathematician Dmitry Semionovitch Mirimanoff (1861-1945). - Amiram Eldar, Jun 10 2021


Paulo Ribenboim, 13 Lectures on Fermat's Last Theorem, Springer, 1979, pp. 23, 152-153.

Alf van der Poorten, Notes on Fermat's Last Theorem, Wiley, 1996, p. 21.


Table of n, a(n) for n=1..2.

Amir Akbary and Sahar Siavashi, The Largest Known Wieferich Numbers, INTEGERS, 18(2018), A3. See Table 1 p. 5.

Chris K. Caldwell, Fermat Quotient, The Prime Glossary.

François G. Dorais and Dominic Klyve, A Wieferich prime search up to  p < 6.7*10^15, J. Integer Seq., Vol. 14 (2011), Article 11.9.2, 1-14.

Wilfrid Keller and Jörg Richstein, Solutions of the congruence a^(p-1) == 1 (mod p^r), Math. Comp., Vol. 74, No. 250 (2005), pp. 927-936.

K. E. Kloss, Some Number-Theoretic Calculations, Journal of Research of the National Bureau of Standards - B. Mathematics and Mathematical Physics, Vol. 69B, No. 4 (Oct.-Dec. 1965), pp. 335-336.

Mathias Lerch, Zur Theorie des Fermatschen Quotienten (a^(p-1) - 1)/p == q(a), Mathematische Annalen, Vol. 60 (1905), pp. 471-490.

D. Mirimanoff, Sur le dernier théorème de Fermat, C. R. Acad. Sci. Paris, Vol. 150 (1910), pp. 204-206. Revised as Sur le dernier théorème de Fermat, Journal für die reine und angewandte Mathematik, Vol. 139 (1911), pp. 309-324.

Planet Math, Wieferich Primes.

Reese Scott and Robert Styer, On the generalized Pillai equation +-a^x +-b^y = c, Journal of Number Theory, Vol. 118, No. 2 (2006), pp. 236-265.


Select[Prime[Range[1000000]], PowerMod[3, # - 1, #^2] == 1 &] (* Robert Price, May 17 2019 *)



N=10^9; default(primelimit, N);

forprime(n=2, N, if(Mod(3, n^2)^(n-1)==1, print1(n, ", ")));

\\ Joerg Arndt, May 01 2013


from sympy import prime

from gmpy2 import powmod

A014127_list = [p for p in (prime(n) for n in range(1, 10**7)) if powmod(3, p-1, p*p) == 1] # Chai Wah Wu, Dec 03 2014


Cf. A039951, A096082.

Sequences "primes p such that p^2 divides X^(p-1)-1": A001220 (X=2), A123692 (X=5), A212583 (X=6), A123693 (X=7), A045616 (X=10), A111027 (X=12), A128667 (X=13), A234810 (X=14), A242741 (X=15), A128668 (X=17), A244260 (X=18), A090968 (X=19), A242982 (X=20), A298951 (X=22), A128669 (X=23), A306255 (X=26), A306256 (X=30).

Sequence in context: A253632 A112854 A211238 * A049192 A156670 A116061

Adjacent sequences:  A014124 A014125 A014126 * A014128 A014129 A014130




N. J. A. Sloane


Edited by Max Alekseyev, Oct 20 2010

Updated by Max Alekseyev, Jan 29 2012



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 06:21 EDT 2021. Contains 346340 sequences. (Running on oeis4.)