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-10 of 23 results. Next

A001220 Wieferich primes: primes p such that p^2 divides 2^(p-1) - 1.

Original entry on oeis.org

1093, 3511
Offset: 1

Views

Author

Keywords

Comments

Sequence is believed to be infinite.
Joseph Silverman showed that the abc-conjecture implies that there are infinitely many primes which are not in the sequence. - Benoit Cloitre, Jan 09 2003
Graves and Murty (2013) improved Silverman's result by showing that for any fixed k > 1, the abc-conjecture implies that there are infinitely many primes == 1 (mod k) which are not in the sequence. - Jonathan Sondow, Jan 21 2013
The squares of these numbers are Fermat pseudoprimes to base 2 (A001567) and Catalan pseudoprimes (A163209). - T. D. Noe, May 22 2003
Primes p that divide the numerator of the harmonic number H((p-1)/2); that is, p divides A001008((p-1)/2). - T. D. Noe, Mar 31 2004
In a 1977 paper, Wells Johnson, citing a suggestion from Lawrence Washington, pointed out the repetitions in the binary representations of the numbers which are one less than the two known Wieferich primes; i.e., 1092 = 10001000100 (base 2); 3510 = 110110110110 (base 2). It is perhaps worth remarking that 1092 = 444 (base 16) and 3510 = 6666 (base 8), so that these numbers are small multiples of repunits in the respective bases. Whether this is mathematically significant does not appear to be known. - John Blythe Dobson, Sep 29 2007
A002326((a(n)^2 - 1)/2) = A002326((a(n)-1)/2). - Vladimir Shevelev, Jul 09 2008, Aug 24 2008
It is believed that p^2 does not divide 3^(p-1) - 1 if p = a(n). This is true for n = 1 and 2. See A178815, A178844, A178900, and Ostafe-Shparlinski (2010) Section 1.1. - Jonathan Sondow, Jun 29 2010
These primes also divide the numerator of the harmonic number H(floor((p-1)/4)). - H. Eskandari (hamid.r.eskandari(AT)gmail.com), Sep 28 2010
1093 and 3511 are prime numbers p satisfying congruence 429327^(p-1) == 1 (mod p^2). Why? - Arkadiusz Wesolowski, Apr 07 2011. Such bases are listed in A247208. - Max Alekseyev, Nov 25 2014. See A269798 for all such bases, prime and composite, that are not powers of 2. - Felix Fröhlich, Apr 07 2018
A196202(A049084(a(1))) = A196202(A049084(a(2))) = 1. - Reinhard Zumkeller, Sep 29 2011
If q is prime and q^2 divides a prime-exponent Mersenne number, then q must be a Wieferich prime. Neither of the two known Wieferich primes divide Mersenne numbers. See Will Edgington's Mersenne page in the links below. - Daran Gill, Apr 04 2013
There are no other terms below 4.97*10^17 as established by PrimeGrid (see link below). - Max Alekseyev, Nov 20 2015. The search was done via PrimeGrid's PRPNet and the results were not double-checked. Because of the unreliability of the testing, the search was suspended in May 2017 (cf. Goetz, 2017). - Felix Fröhlich, Apr 01 2018. On Nov 28 2020, PrimeGrid has resumed the search (cf. Reggie, 2020). - Felix Fröhlich, Nov 29 2020. As of Dec 29 2022, PrimeGrid has completed the search to 2^64 (about 1.8 * 10^19) and has no plans to continue further. - Charles R Greathouse IV, Sep 24 2024
Are there other primes q >= p such that q^2 divides 2^(p-1)-1, where p is a prime? - Thomas Ordowski, Nov 22 2014. Any such q must be a Wieferich prime. - Max Alekseyev, Nov 25 2014
Primes p such that p^2 divides 2^r - 1 for some r, 0 < r < p. - Thomas Ordowski, Nov 28 2014, corrected by Max Alekseyev, Nov 28 2014
For some reason, both p=a(1) and p=a(2) also have more bases b with 1 < b < p that make b^(p-1) == 1 (mod p^2) than any smaller prime p; in other words, a(1) and a(2) belong to A248865. - Jeppe Stig Nielsen, Jul 28 2015
Let r_1, r_2, r_3, ..., r_i be the set of roots of the polynomial X^((p-1)/2) - (p-3)! * X^((p-3)/2) - (p-5)! * X^((p-5)/2) - ... - 1. Then p is a Wieferich prime iff p divides sum{k=1, p}(r_k^((p-1)/2)) (see Example 2 in Jakubec, 1994). - Felix Fröhlich, May 27 2016
Arthur Wieferich showed that if p is not a term of this sequence, then the First Case of Fermat's Last Theorem has no solution in x, y and z for prime exponent p (cf. Wieferich, 1909). - Felix Fröhlich, May 27 2016
Let U_n(P, Q) be a Lucas sequence of the first kind, let e be the Legendre symbol (D/p) and let p be a prime not dividing 2QD, where D = P^2 - 4*Q. Then a prime p such that U_(p-e) == 0 (mod p^2) is called a "Lucas-Wieferich prime associated to the pair (P, Q)". Wieferich primes are those Lucas-Wieferich primes that are associated to the pair (3, 2) (cf. McIntosh, Roettger, 2007, p. 2088). - Felix Fröhlich, May 27 2016
Any repeated prime factor of a term of A000215 is a term of this sequence. Thus, if there exist infinitely many Fermat numbers that are not squarefree, then this sequence is infinite, since no two Fermat numbers share a common factor. - Felix Fröhlich, May 27 2016
If the Diophantine equation p^x - 2^y = d has more than one solution in positive integers (x, y), with (p, d) not being one of the pairs (3, 1), (3, -5), (3, -13) or (5, -3), then p is a term of this sequence (cf. Scott, Styer, 2004, Corollary to Theorem 2). - Felix Fröhlich, Jun 18 2016
Odd primes p such that Chi_(D_0)(p) != 1 and Lambda_p(Q(sqrt(D_0))) != 1, where D_0 < 0 is the fundamental discriminant of the imaginary quadratic field Q(sqrt(1-p^2)) and Chi and Lambda are Iwasawa invariants (cf. Byeon, 2006, Proposition 1 (i)). - Felix Fröhlich, Jun 25 2016
If q is an odd prime, k, p are primes with p = 2*k+1, k == 3 (mod 4), p == -1 (mod q) and p =/= -1 (mod q^3) (Jakubec, 1998, Corollary 2 gives p == -5 (mod q) and p =/= -5 (mod q^3)) with the multiplicative order of q modulo k = (k-1)/2 and q dividing the class number of the real cyclotomic field Q(Zeta_p + (Zeta_p)^(-1)), then q is a term of this sequence (cf. Jakubec, 1995, Theorem 1). - Felix Fröhlich, Jun 25 2016
From Felix Fröhlich, Aug 06 2016: (Start)
Primes p such that p-1 is in A240719.
Prime terms of A077816 (cf. Agoh, Dilcher, Skula, 1997, Corollary 5.9).
p = prime(n) is in the sequence iff T(2, n) > 1, where T = A258045.
p = prime(n) is in the sequence iff an integer k exists such that T(n, k) = 2, where T = A258787. (End)
Conjecture: an integer n > 1 such that n^2 divides 2^(n-1)-1 must be a Wieferich prime. - Thomas Ordowski, Dec 21 2016
The above conjecture is equivalent to the statement that no "Wieferich pseudoprimes" (WPSPs) exist. While base-b WPSPs are known to exist for several bases b > 1 other than 2 (see for example A244752), no base-2 WPSPs are known. Since two necessary conditions for a composite to be a base-2 WPSP are that, both, it is a base-2 Fermat pseudoprime (A001567) and all its prime factors are Wieferich primes (cf. A270833), as shown in the comments in A240719, it seems that the first base-2 WPSP, if it exists, is probably very large. This appears to be supported by the guess that the properties of a composite to be a term of A001567 and of A270833 are "independent" of each other and by the observation that the scatterplot of A256517 seems to become "less dense" at the x-axis parallel line y = 2 for increasing n. It has been suggested in the literature that there could be asymptotically about log(log(x)) Wieferich primes below some number x, which is a function that grows to infinity, but does so very slowly. Considering the above constraints, the number of WPSPs may grow even more slowly, suggesting any such number, should it exist, probably lies far beyond any bound a brute-force search could reach in the forseeable future. Therefore I guess that the conjecture may be false, but a disproof or the discovery of a counterexample are probably extraordinarily difficult problems. - Felix Fröhlich, Jan 18 2019
Named after the German mathematician Arthur Josef Alwin Wieferich (1884-1954). a(1) = 1093 was found by Waldemar Meissner in 1913. a(2) = 3511 was found by N. G. W. H. Beeger in 1922. - Amiram Eldar, Jun 05 2021
From Jianing Song, Jun 21 2025: (Start)
The ring of integers of Q(2^(1/k)) is Z[2^(1/k)] if and only if k does not have a prime factor in this sequence (k is in A342390). See Theorem 5.3 of the paper of Keith Conrad. For example, we have:
(1 + 2^(364/1093) + 2^(2*364/1093) + ... + 2^(1092*364/1093))/1093 is an algebraic integer, but it is not in Z[2^(1/1093)];
(1 + 2^(1755/3511) + 2^(2*1755/3511) + ... + 2^(3510*1755/3511))/3511 is an algebraic integer, but it is not in Z[2^(1/3511)]. (End)

References

  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 28.
  • Richard K. Guy, Unsolved Problems in Number Theory, A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 91.
  • Yves Hellegouarch, "Invitation aux mathématiques de Fermat Wiles", Dunod, 2eme Edition, pp. 340-341.
  • Pace Nielsen, Wieferich primes, heuristics, computations, Abstracts Amer. Math. Soc., 33 (#1, 20912), #1077-11-48.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 263.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 230-234.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, NY, 1986, p. 163.

Crossrefs

Cf. similar primes related to the first case of Fermat's last theorem: A007540, A088164.
Sequences "primes p such that p^2 divides X^(p-1)-1": A014127 (X=3), 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

  • GAP
    Filtered([1..50000],p->IsPrime(p) and (2^(p-1)-1) mod p^2 =0); # Muniru A Asiru, Apr 03 2018
    
  • Haskell
    import Data.List (elemIndices)
    a001220 n = a001220_list !! (n-1)
    a001220_list = map (a000040 . (+ 1)) $ elemIndices 1 a196202_list
    -- Reinhard Zumkeller, Sep 29 2011
    
  • Magma
    [p : p in PrimesUpTo(310000) | IsZero((2^(p-1) - 1) mod (p^2))]; // Vincenzo Librandi, Jan 19 2019
  • Maple
    wieferich := proc (n) local nsq, remain, bin, char: if (not isprime(n)) then RETURN("not prime") fi: nsq := n^2: remain := 2: bin := convert(convert(n-1, binary),string): remain := (remain * 2) mod nsq: bin := substring(bin,2..length(bin)): while (length(bin) > 1) do: char := substring(bin,1..1): if char = "1" then remain := (remain * 2) mod nsq fi: remain := (remain^2) mod nsq: bin := substring(bin,2..length(bin)): od: if (bin = "1") then remain := (remain * 2) mod nsq fi: if remain = 1 then RETURN ("Wieferich prime") fi: RETURN ("non-Wieferich prime"): end: # Ulrich Schimke (ulrschimke(AT)aol.com), Nov 01 2001
  • Mathematica
    Select[Prime[Range[50000]],Divisible[2^(#-1)-1,#^2]&]  (* Harvey P. Dale, Apr 23 2011 *)
    Select[Prime[Range[50000]],PowerMod[2,#-1,#^2]==1&] (* Harvey P. Dale, May 25 2016 *)
  • PARI
    N=10^4; default(primelimit,N);
    forprime(n=2,N,if(Mod(2,n^2)^(n-1)==1,print1(n,", ")));
    \\ Joerg Arndt, May 01 2013
    
  • Python
    from sympy import prime
    from gmpy2 import powmod
    A001220_list = [p for p in (prime(n) for n in range(1,10**7)) if powmod(2,p-1,p*p) == 1]
    # Chai Wah Wu, Dec 03 2014
    

Formula

(A178815(A000720(p))^(p-1) - 1) mod p^2 = A178900(n), where p = a(n). - Jonathan Sondow, Jun 29 2010
Odd primes p such that A002326((p^2-1)/2) = A002326((p-1)/2). See A182297. - Thomas Ordowski, Feb 04 2014

A111027 Wieferich primes in base 12.

Original entry on oeis.org

2693, 123653
Offset: 1

Views

Author

Walter Kehowski, Oct 05 2005

Keywords

Comments

I have searched up to the 9 millionth prime, 160481183 and gave up trying to find a third term. The sequence is conjectured to be infinite. If the behavior is similar to base 10, A045616, then the next term could be greater than 2*10^11. In base 12 with X for ten and E for eleven the sequence is [1685, 5E685] so it would be interesting to see if the third term ends in 685 as well. These primes are also the Wieferich numbers in base 12: 12^phi(n) = 1 mod n^2.
Richard Fischer has carried this search to 4.8 * 10^13 (as of January 2014). - John Blythe Dobson, Mar 06 2014

Crossrefs

Programs

  • Maple
    WP:=[]: for z from 1 to 1 do for k from 1 to 9000000 do p:=ithprime(k); if 12 &^(p-1) mod p^2 = 1 then WP:=[op(WP),p]; printf("p=%d, ",p); fi; if k mod 10^5 = 0 then printf("k=%d, ",k); fi; od; od; WP;
  • Mathematica
    Select[Prime[Range[1000000]], PowerMod[12, # - 1, #^2] == 1 &] (* Robert Price, May 17 2019 *)

Formula

12^(p-1) == 1 mod p^2

A242959 Numbers n such that 5^A000010(n) == 1 (mod n^2).

Original entry on oeis.org

2, 20771, 40487, 41542, 80974, 83084, 161948, 643901, 1255097, 1287802, 1391657, 1931703, 2510194, 2575604, 2783314, 3765291, 3863406, 4174971, 5020388, 5151208, 5566628, 7530582, 7726812, 8349942, 10040776, 11133256, 15061164, 15308227, 15453624, 16699884
Offset: 1

Views

Author

Felix Fröhlich, May 27 2014

Keywords

Crossrefs

If a(n) is prime, then a(n) is in A123692.

Programs

  • Mathematica
    Select[Range[167*10^5],PowerMod[5,EulerPhi[#],#^2]==1&] (* Harvey P. Dale, Jun 02 2020 *)
  • PARI
    for(n=2, 10^9, if(Mod(5, n^2)^(eulerphi(n))==1, print1(n, ", ")))

A242960 Numbers n such that 7^A000010(n) == 1 (mod n^2).

Original entry on oeis.org

4, 5, 10, 20, 40, 80, 491531, 983062, 1966124, 2457655, 3932248, 4915310, 6389903, 9339089, 9830620, 12288275, 12779806, 18678178, 19169709, 19661240, 24576550, 25559612, 28017267, 31949515, 37356356, 38339418, 39322480, 46695445, 49153100, 51119224, 56034534
Offset: 1

Views

Author

Felix Fröhlich, May 27 2014

Keywords

Crossrefs

Cf. A077816, A242959, A000010. All primes in this sequence are in A123693.

Programs

  • PARI
    for(n=2, 10^9, if(Mod(7, n^2)^(eulerphi(n))==1, print1(n, ", ")))

Extensions

Terms a(23) and beyond from Giovanni Resta, Jan 24 2020

A242958 Numbers n such that 3^phi(n) == 1 (mod n^2), where phi(n) is Euler's totient function.

Original entry on oeis.org

11, 22, 44, 55, 110, 220, 440, 880, 1006003, 2012006, 4024012, 11066033, 22132066, 44264132, 55330165, 88528264, 110660330, 221320660, 442641320, 885282640, 1770565280, 56224501667, 112449003334, 224898006668, 393571511669, 449796013336, 618469518337, 787143023338
Offset: 1

Views

Author

Felix Fröhlich, May 27 2014

Keywords

Comments

a(21) > 10^9.
All listed composite terms are multiples of the two known primes in this sequence, 11 and 1006003, the only known base 3 Wieferich primes.

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Mod[3^EulerPhi[#], #^2] == 1 &] (* Alonso del Arte, Jun 02 2014 *)
  • PARI
    for(n=2, 10^9, if(Mod(3, n^2)^(eulerphi(n))==1, print1(n, ", ")))

Extensions

Terms a(21) and beyond from Giovanni Resta, Jan 27 2020

A245529 Numbers n such that 12^phi(n) == 1 (mod n^2), where phi(n) is Euler's totient function.

Original entry on oeis.org

2693, 123653, 1812389, 2349407, 12686723, 201183431, 332997529, 3822485189, 6326953051, 54520709801, 224107337017, 272603549005, 541786979683, 1035893486219, 1568751359119, 4258039403323, 5179467431095, 10293952613977, 29806275823261
Offset: 1

Views

Author

Felix Fröhlich, Jul 25 2014

Keywords

Comments

a(8) > 10^9.
If a(n) is prime, it is in A111027.
a(20) > 10^14. - Giovanni Resta, Jan 27 2020

Crossrefs

Programs

  • Maple
    with(numtheory): A245529:=n->`if`( (12 &^ phi(n)-1) mod n^2 = 0, n, NULL): seq(A245529(n), n=2..10^4); # Wesley Ivan Hurt, Jul 26 2014
  • Mathematica
    Select[Range[10^5], PowerMod[12, EulerPhi[#], #^2] == 1 &] (* Alonso del Arte, Jul 27 2014 *)
  • PARI
    for(n=2, 1e9, if(Mod(12, n^2)^(eulerphi(n))==1, print1(n, ", ")))

Extensions

a(8)-a(12) from Giovanni Resta, Jan 24 2020
a(13)-a(19) from Giovanni Resta, Jan 27 2020

A182297 Wieferich numbers (2): positive odd integers q such that q and (2^A002326((q-1)/2)-1)/q are not relatively prime.

Original entry on oeis.org

21, 39, 55, 57, 105, 111, 147, 155, 165, 171, 183, 195, 201, 203, 205, 219, 231, 237, 253, 273, 285, 291, 301, 305, 309, 327, 333, 355, 357, 385, 399, 417, 429, 453, 465, 483, 489, 495, 497, 505, 507, 525, 543, 555, 579, 597, 605, 609, 615, 627, 633, 651, 655
Offset: 1

Views

Author

Felix Fröhlich, Apr 23 2012

Keywords

Comments

The primes in this sequence are A001220, the Wieferich primes. - Charles R Greathouse IV, Feb 02 2014
Odd prime p is a Wieferich prime if and only if A002326((p^2-1)/2) = A002326((p-1)/2). See the sixth comment to A001220 and my formula below. - Thomas Ordowski, Feb 03 2014

Examples

			21 is in the sequence because the multiplicative order of 2 mod 21 is 6, and (2^6-1)/21 = 3, which is not coprime to 21.
		

Crossrefs

For another definition of Wieferich numbers, see A077816.
Cf. A002326.

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local q;
          for q from 2 +`if`(n=1, 1, a(n-1)) by 2
            while igcd((2^order(2, q)-1)/q, q)=1 do od; q
        end:
    seq (a(n), n=1..60);  # Alois P. Heinz, Apr 23 2012
  • Mathematica
    Select[Range[1, 799, 2], GCD[#, (2^MultiplicativeOrder[2, #] - 1)/#] > 1 &] (* Alonso del Arte, Apr 23 2012 *)
  • PARI
    is(n)=n%2 && gcd(lift(Mod(2,n^2)^znorder(Mod(2,n))-1)/n,n)>1 \\ Charles R Greathouse IV, Feb 02 2014

Formula

Odd numbers q such that A002326((q^2-1)/2) < q * A002326((q-1)/2). Other positive odd integers satisfy the equality. - Thomas Ordowski, Feb 03 2014
Odd numbers q such that gcd(A165781((q-1)/2), q) > 1. - Thomas Ordowski, Feb 12 2014

A241977 Numbers k>1 such that 10^phi(k) == 1 (mod k^2), where phi(n)=A000010(n).

Original entry on oeis.org

3, 487, 1461, 4383, 13149, 39447, 118341, 355023, 56598313, 169794939, 509384817, 1754547703, 5263643109, 7187985751, 15790929327, 21563957253, 27563378431, 33902389487, 47372787981, 50315900257, 64691871759, 82690135293, 101707168461, 150947700771
Offset: 1

Views

Author

Felix Fröhlich, Aug 10 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[400000], PowerMod[10, EulerPhi[#], #^2] == 1 &] (* Amiram Eldar, Oct 16 2023 *)
  • PARI
    for(n=2, 1e9, if(Mod(10, n^2)^(eulerphi(n))==1, print1(n, ", ")))

Extensions

Terms a(12) and beyond from Giovanni Resta, Jan 24 2020

A241978 Numbers n such that 6^phi(n) == 1 (modulo n^2), where phi(n) is Euler's totient function.

Original entry on oeis.org

66161, 330805, 534851, 2674255, 3152573, 10162169, 13371275, 50810845, 54715147, 129255493, 148170931, 254054225, 273575735, 301121113, 383006029, 646277465, 1289402357, 1505605565, 1915030145, 3228193673, 3407931413, 5721301147, 6075008171, 7528027825
Offset: 1

Views

Author

Felix Fröhlich, Aug 10 2014

Keywords

Comments

a(17) > 10^9.

Crossrefs

Programs

  • Mathematica
    Select[Range[65*10^7],PowerMod[6,EulerPhi[#],#^2]==1&] (* Harvey P. Dale, Jan 20 2020 *)
  • PARI
    for(n=2, 1e9, if(Mod(6, n^2)^(eulerphi(n))==1, print1(n, ", ")))

Extensions

Terms a(17) and beyond from Giovanni Resta, Jan 24 2020

A077815 2^phi(n) mod n^2, where phi is Euler's totient function A000010.

Original entry on oeis.org

0, 2, 4, 4, 16, 4, 15, 16, 64, 16, 56, 16, 40, 64, 31, 0, 222, 64, 58, 256, 127, 56, 392, 256, 451, 40, 433, 176, 30, 256, 187, 0, 958, 800, 841, 208, 38, 780, 586, 1536, 944, 568, 1076, 1200, 91, 392, 2069, 1024, 2157, 1076, 1021, 1600, 1909, 2620, 826, 2752
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 17 2002

Keywords

Examples

			a(42) = 2^phi(42) mod 42*42 = 2^phi(2*3*7) mod 1764 = 2^(42*(1-1/2)*(1-1/3)*(1-1/7)) mod 1764 = 2^12 mod 1764 = 4096 mod 1764 = 568.
		

Crossrefs

Programs

Showing 1-10 of 23 results. Next