cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A014127 Mirimanoff primes: primes p such that p^2 divides 3^(p-1) - 1.

Original entry on oeis.org

11, 1006003
Offset: 1

Views

Author

Keywords

Comments

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

References

  • Paulo Ribenboim, 13 Lectures on Fermat's Last Theorem, Springer, 1979, pp. 23, 152-153.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 233.
  • Alf van der Poorten, Notes on Fermat's Last Theorem, Wiley, 1996, p. 21.

Crossrefs

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).

Programs

  • Mathematica
    Select[Prime[Range[1000000]], PowerMod[3, # - 1, #^2] == 1 &] (* Robert Price, May 17 2019 *)
  • PARI
    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
    
  • Python
    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

Extensions

Edited by Max Alekseyev, Oct 20 2010
Updated by Max Alekseyev, Jan 29 2012

A039951 a(n) is the smallest prime p such that p^2 divides n^(p-1) - 1.

Original entry on oeis.org

2, 1093, 11, 1093, 2, 66161, 5, 3, 2, 3, 71, 2693, 2, 29, 29131, 1093, 2, 5, 3, 281, 2, 13, 13, 5, 2, 3, 11, 3, 2, 7, 7, 5, 2, 46145917691, 3, 66161, 2, 17, 8039, 11, 2, 23, 5, 3, 2, 3
Offset: 1

Views

Author

Keywords

Comments

a(n^k) <= a(n) for any n,k > 1.
a(n) is currently unknown for n in {47, 72, 186, 187, 200, 203, 222, 231, 304, 311, 335, 355, 435, 454, 546, 554, 610, 639, 662, 760, 772, 798, 808, 812, 858, 860, 871, 983, 986, ...}. - Richard Fischer, Jul 15 2021
a(47) > 1.4*10^14, a(72) > 1.4*10^14 (see Fischer's tables).
For all nonnegative integers n and k, a(n^(n^k)) = a(n) (see Puzzle 762 in the links). Also a(n) = 3 if and only if mod(n, 36) is in the set {8, 10, 19, 26, 28, 35}. - Farideh Firoozbakht and Jahangeer Kholdi, Nov 01 2014

Crossrefs

Programs

  • Mathematica
    Table[p = 2; While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p, {n, 33}] (* Michael De Vlieger, Nov 24 2016 *)
    f[n_] := Block[{p = 2}, While[ PowerMod[n, p - 1, p^2] != 1, p = NextPrime@ p]; p]; Array[f, 33] (* Robert G. Wilson v, Jul 18 2018 *)
  • PARI
    a(n)={forprime(p=2, oo, if(Mod(n, p^2)^(p-1)==1, return(p))); oo} \\ Felix Fröhlich, Jul 24 2014

Formula

a(4k+1) = 2.
a(n) = A096082(n) for all n > 1 that are not of the form 4k+1. Note that A096082 begins with n = 2. [Corrected and clarified by Jonathan Sondow, Jun 17-18 2010]

Extensions

a(34)-a(46) from Helmut Richter (richter(AT)lrz.de), May 17 2004
Entry revised by N. J. A. Sloane, Nov 30 2006
Edited by Max Alekseyev, Oct 06, Oct 09 2009
Edited and updated by Max Alekseyev, Jan 29 2012

A039678 Smallest number m > 1 such that m^(p-1)-1 is divisible by p^2, where p = n-th prime.

Original entry on oeis.org

5, 8, 7, 18, 3, 19, 38, 28, 28, 14, 115, 18, 51, 19, 53, 338, 53, 264, 143, 11, 306, 31, 99, 184, 53, 181, 43, 164, 96, 68, 38, 58, 19, 328, 313, 78, 226, 65, 253, 259, 532, 78, 176, 276, 143, 174, 165, 69, 330, 44, 33, 332, 94, 263, 48, 79, 171, 747, 731, 20, 147, 91, 40
Offset: 1

Views

Author

Keywords

Comments

Using Fermat's little theorem twice, it is easy to see that m=p^2-1 solves this problem for all odd primes p. In fact, there appear to be exactly p-1 values of m with 1 <= m <= p^2 for which m^(p-1) == 1 (mod p^2). See A096082 for the related open problem. - T. D. Noe, Aug 24 2008
That there are exactly p-1 values of 1 <= m <= p^2 for which m^(p-1) == 1 (mod p^2) follows immediately from Hensel's lifting lemma and Fermat's little theorem - every solution mod p corresponds to a unique solution mod p^2. - Phil Carmody, Jan 10 2011
For n > 2, prime(n) does not divide a(n)^2 - 1, so a(n) is the smallest m > 1 such that (m^(prime(n)-1) - 1)/(m^2 - 1) == 0 (mod prime(n)^2). - Thomas Ordowski, Nov 24 2018

Examples

			For n=3, p=5 is the third prime and 5^2 = 25 divides 7^4 - 1 = 2400.
		

References

  • P. Ribenboim, The New Book of Prime Number Records, Springer, 1996, 345-349.

Crossrefs

Cf. A185103.

Programs

  • Mathematica
    dpa[n_]:=Module[{p=Prime[n],a=2},While[PowerMod[a,p-1,p^2]!=1,a++];a]; Array[dpa,70] (* Harvey P. Dale, Sep 05 2012 *)
  • PARI
    a(n) = my(p=prime(n)); for(a=2, oo, if(Mod(a, p^2)^(p-1)==1, return(a))) \\ Felix Fröhlich, Nov 24 2018
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A039678(n): return 2**2+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**2,True)[1]) # Chai Wah Wu, May 18 2022

Formula

a(n) = A185103(A000040(n)).

Extensions

More terms from David W. Wilson
Definition adjusted by Felix Fröhlich, Jun 24 2014
Edited by Felix Fröhlich, Nov 24 2018

A123692 Primes p such that p^2 divides 5^(p-1) - 1.

Original entry on oeis.org

2, 20771, 40487, 53471161, 1645333507, 6692367337, 188748146801
Offset: 1

Views

Author

Max Alekseyev, Oct 07 2006

Keywords

Comments

Dorais and Klyve proved that there are no further terms up to 9.7*10^14.
From Felix Fröhlich, Jan 06 2017: (Start)
a(6) and a(7) were found by Keller and Richstein (cf. Keller, Richstein, 2005).
Prime terms of A242959. (End)
From Jianing Song, Jun 21 2025: (Start)
The ring of integers of Q(5^(1/k)) is Z[5^(1/k)] if and only if k does not have a prime factor in this sequence (k is even or in A342391). See Theorem 5.3 of the paper of Keith Conrad. For example, we have:
(1 + sqrt(5))/2 is an algebraic integer, but it is not in Z[sqrt(5)];
(1 + 5^(10385/20771) + 5^(2*10385/20771) + ... + 5^(10384*10385/20771))/20771 is an algebraic integer, but it is not in Z[5^(1/20771)];
(1 + 5^(40486/40487) + 5^(2*40486/40487) + ... + 5^(40486*40486/40487))/40487 is an algebraic integer, but it is not in Z[5^(1/40487)]. (End)

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 233.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2500]], Divisible[5^(# - 1) - 1, #^2] &] (* Alonso del Arte, Aug 01 2014 *)
    Select[Prime[Range[55*10^6]],PowerMod[5,#-1,#^2]==1&] (* The program generates the first 4 terms of the sequence. *) (* Harvey P. Dale, Jan 29 2023 *)
  • PARI
    N=10^9; default(primelimit, N);
    forprime(n=2, N, if(Mod(5, n^2)^(n-1)==1, print1(n, ", ")));
    \\ Joerg Arndt, May 01 2013

Extensions

More terms from Alexander Adamchuk, Nov 27 2006
Updated by Max Alekseyev, Jan 29 2012

A090968 Primes p such that p^2 divides 19^(p-1) - 1.

Original entry on oeis.org

3, 7, 13, 43, 137, 63061489
Offset: 1

Views

Author

Robert G. Wilson v, Feb 27 2004

Keywords

Comments

Primes p such that p divides the Fermat quotient of p (with base 19). The Fermat quotient of p with base a denotes the integer q_p(a) = ( a^(p-1) - 1) / p, where p is a prime which does not divide the integer a. - C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 20 2005
No further terms up to 3.127*10^13.

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 43, p. 17, Ellipses, Paris 2008.
  • Paulo Ribenboim, The Little Book Of Big Primes, Springer-Verlag, NY 1991, page 170.
  • Roozbeh Hazrat, Mathematica: A Problem-Centered Approach, Springer 2010, pp. 39, 171. [Harvey P. Dale, Oct 17 2011]

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ p = NextPrim[p]; If[PowerMod[19, p - 1, p^2] == 1, Print[p]], {n, 1, 2*10^8}]
    Select[Prime[Range[4*10^6]],PowerMod[19,#-1,#^2]==1&] (* Harvey P. Dale, Nov 08 2017 *)

A143548 Irregular triangle of numbers k < p^2 such that p^2 divides k^(p-1)-1, with p=prime(n).

Original entry on oeis.org

1, 1, 8, 1, 7, 18, 24, 1, 18, 19, 30, 31, 48, 1, 3, 9, 27, 40, 81, 94, 112, 118, 120, 1, 19, 22, 23, 70, 80, 89, 99, 146, 147, 150, 168, 1, 38, 40, 65, 75, 110, 131, 134, 155, 158, 179, 214, 224, 249, 251, 288, 1, 28, 54, 62, 68, 69, 99, 116, 127, 234, 245, 262, 292, 293, 299, 307, 333, 360
Offset: 1

Views

Author

T. D. Noe, Aug 24 2008

Keywords

Comments

Row n begins with 1 and has prime(n)-1 terms. The first differences of each row are symmetric. For k > p^2, the solutions are just shifted by m*p^2 for m > 0. An open question is whether every integer appears in this sequence. For instance, 2 does not appear until the prime 1093 and 5 does not appear until the prime 20771.
For row n > 1, the sum of the terms in row n is (p-1)*p^2*(p+1)/2, which is A138416. - T. D. Noe, Aug 24 2008, corrected by Robert Israel, Sep 27 2016
Max Alekseyev points out that there is a much faster method of computing these numbers. Let p=prime(n) and let r be a primitive root of p (see A001918 and A060749). Then the terms in row n are r^(k*p) (mod p^2) for k=0..p-2. - T. D. Noe, Aug 26 2008
The numbers in this sequence are the bases to Euler pseudoprimes q, which are squares of prime numbers, such that n^((q-1)/2) == +-1 mod q. An exception is the first number 9 = 3*3, which is, following the strict definition in Crandall and Pomerance, no Fermat pseudoprime and hence no Euler pseudoprime. - Karsten Meyer, Jan 08 2011
For row n > 1, the sum is zero modulo p^2 (rows are antisymmetric due to Binomial Theorem). - Peter A. Lawrence, Sep 11 2016

Examples

			(2)   1,
(3)   1, 8,
(5)   1, 7, 18, 24,
(7)   1, 18, 19, 30, 31, 48,
(11)  1, 3, 9, 27, 40, 81, 94, 112, 118, 120,
(13)  1, 19, 22, 23, 70, 80, 89, 99, 146, 147, 150, 168,
(17)  1, 38, 40, 65, 75, 110, 131, 134, 155, 158, 179, 214, 224, 249, 251, 288,
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2005

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,j,x;
      p:= ithprime(n);
      x:= numtheory:-primroot(p);
      op(sort([seq(x^(i*p) mod p^2, i=0..p-2)]))
    end proc:
    map(f, [$1..20]); # Robert Israel, Sep 27 2016
  • Mathematica
    Flatten[Table[p=Prime[n]; Select[Range[p^2], PowerMod[ #,p-1,p^2]==1&], {n,50}]] (* T. D. Noe, Aug 24 2008 *)
    Flatten[Table[p=Prime[n]; r=PrimitiveRoot[p]; b=PowerMod[r,p,p^2]; Sort[NestList[Mod[b*#,p^2]&,1,p-2]], {n,50}]] (* Faster version from T. D. Noe, Aug 26 2008 *)

A242982 Primes p such that p^2 divides 20^(p-1) - 1.

Original entry on oeis.org

281, 46457, 9377747, 122959073
Offset: 1

Views

Author

Felix Fröhlich, May 28 2014

Keywords

Comments

Base 20 Wieferich primes. According to Richard Fischer, there is no other term up to approximately 5*10^13.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000000]], PowerMod[20, # - 1, #^2] == 1 &] (* Robert Price, May 17 2019 *)
  • PARI
    forprime(n=2, 10^9, if(Mod(20, n^2)^(n-1)==1, print1(n, ", ")));

A244260 Primes p such that p^2 divides 18^(p-1) - 1.

Original entry on oeis.org

5, 7, 37, 331, 33923, 1284043
Offset: 1

Views

Author

Felix Fröhlich, Jun 24 2014

Keywords

Comments

Base 18 Wieferich primes. According to Richard Fischer there is no other term up to approximately 5*10^13.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000000]], PowerMod[18, # - 1, #^2] == 1 &] (* Robert Price, May 17 2019 *)
  • PARI
    forprime(n=2, 10^9, if(Mod(18, n^2)^(n-1)==1, print1(n, ", ")));

A247072 Smallest Wieferich prime (> sqrt(n)) in base n.

Original entry on oeis.org

2, 1093, 11, 1093, 20771, 66161, 5, 3, 11, 487, 71, 2693, 863, 29, 29131, 1093, 46021, 5, 7, 281
Offset: 1

Views

Author

Eric Chen, Nov 16 2014

Keywords

Comments

a(n) = Smallest prime such that n appears in A143548. - Eric Chen, Nov 26 2014
The square of a(n) is the smallest squared prime that is a pseudoprime (> n) in base n; for example, a(2) = 1093, and 1093^2 = 1194649 is the smallest squared prime that is pseudoprime in base 2. - Eric Chen, Nov 26 2014
Is a(n) defined for all n? - Eric Chen, Nov 26 2014
Does every prime appear in this sequence? - Eric Chen, Nov 26 2014
a(22)..a(28) = {13, 13, 5, 20771, 71, 11, 19}, a(30)..a(46) = {7, 7, 1093, 233, 46145917691, 1613, 66161, 77867, 17, 8039, 11, 29, 23, 103, 229, 1283, 829}, a(48)..a(49) = {7, 491531}, a(51)..a(60) = {41, 461, 47, 19, 30109, 647, 47699, 131, 2777, 29}, a(62)..a(71) = {19, 23, 1093, 17, 89351671, 47, 19, 19, 13, 47}, a(74)..a(81) = {1251922253819, 17, 37, 32687, 43, 263, 13, 11}, a(83)..a(100) = {4871, 163, 11779, 68239, 1999, 2535619637, 13, 6590291053, 293, 727, 509, 11, 2137, 109, 2914393, 28627, 13, 487}; a(n) is currently unknown for n = {21, 29, 47, 50, 61, 72, 73, 82, 126, 132, 154, 186, 187, 188, 200, 203, 222, 231, 237, 301, 304, 309, 311, 327, 335, 347, 351, 355, 357, 435, 441, 454, 458, 496, 541, 542, 546, 554, 570, 593, 609, 610, 639, 640, 654, 662, 668, 674, 692, 697, 698, 701, 718, 724, 725, 727, 733, 743, 760, 772, 775, 777, 784, 798, 807, 808, 812, 829, 841, 858, 860, 871, 883, 912, 919, 944, 980, 983, 986, ...}. - Eric Chen, Nov 26 2014
a(21) > 3.4 * 10^13. - Eric Chen, Nov 26 2014

Examples

			a(12) = 2693 because the Wieferich primes to base 12 are 2693, 123653, ..., and 2693 is greater than sqrt(12), so a(12) = 2693.
a(17) = 46021 because the Wieferich primes to base 17 are 2, 3, 46021, 48947, 478225523351, ..., but neither 2 nor 3 is greater than sqrt(17), so a(17) = 46021.
		

Crossrefs

Programs

  • Mathematica
    a247072[n_] := Block[{p = Int[Sqrt[n]]+1}, While[!PrimeQ[p] || [p < 10^8 && PowerMod[n, p - 1, p^2] != 1], p++]; If[p == 10^8, 0, p]]; Table[ a247072[n], {n, 100}] (* Eric Chen, Nov 27 2014 *)
  • PARI
    a(n)=forprime(p=sqrtint(n)+1,,if(Mod(n^(p-1),p^2)==1,return(p)))
    n=1; while(n<101, print1(a(n), ", "); n++) \\ Charles R Greathouse IV, Nov 16 2014
Showing 1-9 of 9 results.