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.

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

A244752 Square array read by antidiagonals in which rows are indexed by composite numbers w and row w gives n such that n^(w-1) == 1 (mod w^2).

Original entry on oeis.org

17, 33, 37, 49, 73, 65, 65, 109, 129, 80, 81, 145, 193, 82, 101, 97, 181, 257, 161, 201, 145, 113, 217, 321, 163, 301, 289, 197, 129, 253, 385, 242, 401, 433, 393, 26, 145, 289, 449, 244, 501, 577, 589, 199, 257, 161, 325, 513, 323, 601, 721, 785, 224, 513
Offset: 2

Views

Author

Felix Fröhlich, Jul 05 2014

Keywords

Comments

We can say that "w is a Wieferich pseudoprime to base n".
Any prime factor of w is a Wieferich prime to base n.

Examples

			Table starts
w=4: 17, 33, 49, 65, 81, 97, 113, ....
w=6: 37, 73, 109, 145, 181, 217, ....
w=8: 65, 129, 193, 257, 321, 385, ....
w=9: 80, 82, 161, 163, 242, 244, ....
w=10: 101, 201, 301, 401, 501, 601, ....
w=12: 145, 289, 433, 577, 721, 865, ....
w=14: 197, 393, 589, 785, 981, ....
....
		

Crossrefs

Programs

  • Mathematica
    T = {};
    For[w = 4, w <= 100, w++,
      If[PrimeQ[w], Continue[]];
      t = {};
      For [n = 2, n <= 10^5, n++,
       If[Mod[n^(w - 1), w^2] == 1, AppendTo[t, n]]];
      AppendTo[T, t]];
    Print[TableForm[T]];
    A244752 = {};
    For[c = 1, c <= 50, c++,
      For[r = 1, r <= c, r++, AppendTo[A244752, T[[r]][[c - r + 1]]]]];
    A244752 (* Robert Price, Sep 07 2019 *)
  • PARI
    forcomposite(w=2, 20, print1("w=", w, ": "); for(n=2, 10^3, if(Mod(n, w^2)^(w-1)==1, print1(n, ", "))); print(""))

Extensions

a(17)-a(55) from Robert Price, Sep 07 2019

A270833 Numbers n > 1 where all prime factors are Wieferich primes, i.e., terms of A001220.

Original entry on oeis.org

1093, 3511, 1194649, 3837523, 12327121, 1305751357, 4194412639, 13473543253, 43280521831, 1427186233201, 4584493014427, 14726582775529, 47305610361283, 151957912148641, 5010850864768711, 16096154973653197, 51705032124882319, 166089997978464613
Offset: 1

Views

Author

Felix Fröhlich, Mar 23 2016

Keywords

Comments

The prime terms are Wieferich primes.
All "Wieferich pseudoprimes", if any exist, are in the sequence (see second comment in A240719).

Examples

			4194412639 = 1093^2 * 3511. All prime factors are Wieferich primes, so 4194412639 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Take[#, 19] &@ Rest@ Sort@ Map[1093^First@ # 3511^Last@ # &, Tuples[Range[0, 6], 2]] (* Michael De Vlieger, Mar 24 2016 *)
  • PARI
    is(n) = if(n==1, return(0)); my(f=factor(n)[, 1]); for(k=1, #f, if(Mod(2, f[k]^2)^(f[k]-1)!=1, return(0))); return(1)
    
  • PARI
    /* The following program is significantly faster; valid up to (p^x * q^y) < b, where b is the upper search bound for Wieferich primes (approximately 5*10^17 as of Mar 23 2016, see PrimeGrid PRPNet server statistics) */
    my(p=1093, q=3511, v=vector(0), w=vector(1)); for(x=0, 4, for(y=0, 4, w[1]=p^x*q^y; v=concat(v, w))); vecextract(vecsort(v,,8), "2..25")

A273339 Smallest composite c such that n^(c-1) != 1 (mod c^2), i.e., smallest composite c that is not a "Wieferich pseudoprime" to base n.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 4, 4, 4, 4, 4, 4, 4
Offset: 2

Views

Author

Felix Fröhlich, May 20 2016

Keywords

Comments

Smallest composite c such that n does not occur in row c of the array in A244752. - Felix Fröhlich, Jan 07 2017
Conjecture: periodic with period = 16. - Harvey P. Dale, May 12 2025
For any set S of composite numbers, if n is a composite == 1 (mod lcm(S)^2) then n^(c-1) == 1 (mod c^2) for all c in S, so a(n) is not in S. Thus the sequence has infinitely many distinct members, and in particular the conjecture is false. - Robert Israel, Aug 15 2025

Crossrefs

Programs

  • Maple
    f:= proc(n) local c;
      for c from 4 do
        if not isprime(c) and n &^(c-1) mod (c^2) <> 1 then return c fi
      od
    end proc:
    map(f, [$2..100]); # Robert Israel, Aug 15 2025
  • Mathematica
    A273339[n_] := NestWhile[#+1 &, 4, PrimeQ[#] || PowerMod[n, #-1, #^2] == 1 &];
    Array[A273339, 100, 2] (* Paolo Xausa, Aug 15 2025 *)
  • PARI
    a(n) = forcomposite(c=1, , if(Mod(n, c^2)^(c-1)!=1, return(c)))

A298944 a(n) = 2^(c-1) mod c^2, where c is the n-th composite number.

Original entry on oeis.org

8, 32, 0, 13, 12, 32, 156, 184, 0, 176, 288, 319, 464, 320, 341, 496, 40, 64, 212, 0, 301, 308, 9, 1040, 952, 472, 1088, 1544, 800, 391, 508, 2048, 1191, 1312, 922, 2608, 284, 2359, 1920, 688, 1800, 3488, 2668, 2524, 0, 2291, 428, 144, 3109, 2612, 1472, 2888
Offset: 1

Views

Author

Felix Fröhlich, Jan 30 2018

Keywords

Comments

a(n) = 0 iff c is a term of A000079 > 4.
Composites c where a(n) = 1 could be called "Wieferich pseudoprimes". Do any such composites exist?
A necessary condition for c to be a "Wieferich pseudoprime" would be that it is a term of both A001567 and A270833 (see comments in A240719).

Crossrefs

Programs

  • Maple
    map(c -> 2&^(c-1) mod c^2, remove(isprime, [$4..1000])); # Robert Israel, Feb 27 2018
  • Mathematica
    composite[n_Integer] := FixedPoint[n + PrimePi@ # + 1 &, n + PrimePi@ n + 1]; Array[With[{c = composite@ #}, Mod[2^(c - 1), c^2]] &, 52] (* Michael De Vlieger, Jan 31 2018, composite function by Robert G. Wilson v at A066277 *)
  • PARI
    forcomposite(c=1, 200, print1(lift(Mod(2, c^2)^(c-1)), ", "))

A220105 2^(n-1) mod n^2.

Original entry on oeis.org

0, 2, 4, 8, 16, 32, 15, 0, 13, 12, 56, 32, 40, 156, 184, 0, 222, 176, 58, 288, 319, 464, 392, 320, 341, 496, 40, 64, 30, 212, 187, 0, 301, 308, 9, 1040, 38, 952, 472, 1088, 944, 1544, 1076, 800, 391, 508, 2069, 2048, 1191, 1312, 922, 2608, 1909, 284, 2359
Offset: 1

Views

Author

Franz Vrabec, Dec 17 2012

Keywords

Comments

If p is a Wieferich prime, then a(p) = 1, that is, a(A001220(n)) = 1.
a(n) = 0 iff n = 1 or n = 2^k (k >= 3).
a(n) = 1 iff n is either a Wieferich prime or a Wieferich pseudoprime (i.e. a composite c such that c-1 is in A240719). - Felix Fröhlich, Jul 11 2014

Examples

			a(7) = 2^(7-1) mod 7^2 = 64 mod 49 = 15.
		

Crossrefs

Programs

  • Mathematica
    Table[PowerMod[2, n - 1, n^2], {n, 100}] (* T. D. Noe, Dec 17 2012 *)

A273785 Numbers n where a composite c < n exists such that n^(c-1) == 1 (mod c^2), i.e., such that c is a "base-n Wieferich pseudoprime".

Original entry on oeis.org

17, 26, 33, 37, 49, 65, 73, 80, 81, 82, 97, 99, 101, 109, 113, 129, 145, 146, 161, 163, 168, 170, 177, 181, 182, 193, 197, 199, 201, 209, 217, 224, 225, 226, 239, 241, 242, 244, 251, 253, 257, 268, 273, 289, 293, 301, 305, 321, 323, 325, 337, 353, 360, 361
Offset: 1

Views

Author

Felix Fröhlich, May 30 2016

Keywords

Comments

Contains n+1 for n in A048111. - Robert Israel, Apr 20 2017

Examples

			15 satisfies the congruence 26^(15-1) == 1 (mod 15^2) and 15 < 26, so 26 is a term of the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Res:= {}:
    for c from 4 to N-1 do
      if not isprime(c) then
        for m in map(rhs@op, [msolve(x^(c-1)-1, c^2)]) do
           if m > c and m <= N then Res:= Res union {m, seq(k*c^2+m, k=1..(N-m)/c^2)}
           else Res:= Res union {seq(k*c^2+m, k=1..(N-m)/c^2)}
           fi
        od
      fi
    od:
    sort(convert(Res,list)); # Robert Israel, Apr 20 2017
  • Mathematica
    nn = 361; c = Select[Range@ nn, CompositeQ]; Select[Range@ nn, Function[n, Count[TakeWhile[c, # <= n &], k_ /; Mod[n^(k - 1), k^2] == 1] > 0]] (* Michael De Vlieger, May 30 2016 *)
  • PARI
    is(n) = forcomposite(c=1, n-1, if(Mod(n, c^2)^(c-1)==1, return(1))); return(0)

A115948 a(n) = (2^(semiprime(n)-1)) modulo (semiprime(n)^2).

Original entry on oeis.org

8, 32, 13, 12, 156, 184, 319, 464, 341, 496, 301, 308, 9, 952, 472, 508, 1191, 922, 2359, 688, 1800, 2668, 2291, 3109, 2888, 4860, 412, 4691, 604, 2875, 4523, 2236, 3856, 5659, 2016, 8662, 3259, 8852, 13239, 6953, 1344, 6277, 7357, 2857, 11660, 18193
Offset: 1

Views

Author

Jonathan Vos Post, Mar 14 2006

Keywords

Comments

Wieferich function of semiprimes.
This appears in the search for the semiprime analogy to A001220 Wieferich primes p: p^2 divides 2^(p-1) - 1. That is, the Wieferich function W(p) of primes p is W(p) = 2^(p-1) modulo p^2 and a (rare!) Wieferich prime (A001220) is one such that W(p) = 1. The current sequence is W(semiprime(n)). Any semiprime s for which W(s) = 1 would be a "Wieferich semiprime." This is also related to Fermat's "little theorem" that for any odd prime p we have 2^(p-1) == 1 modulo p.
Such a "Wieferich semiprime" would be a special case of a "Wieferich pseudoprime", i.e. it would be a composite integer that is one more than a term in A240719 and has two prime factors. - Felix Fröhlich, Jul 16 2014

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 28.
  • R. 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.

Crossrefs

Programs

  • Mathematica
    PowerMod[2, # - 1, #^2] & /@ Select[ Range@141, Plus @@ Last /@ FactorInteger@# == 2 &] (* Robert G. Wilson v *)

Formula

a(n) = (2^(A001358(n)-1)) modulo (A001358(n)^2).

Extensions

More terms from Robert G. Wilson v, Mar 14 2006

A327593 Numbers m where an integer b that is a power of two > 2 with 1 < b < m exists such that m is a base-b repdigit.

Original entry on oeis.org

5, 9, 10, 15, 17, 18, 21, 27, 33, 34, 36, 42, 45, 51, 54, 63, 65, 66, 68, 73, 85, 99, 102, 119, 129, 130, 132, 136, 146, 153, 165, 170, 187, 195, 198, 204, 219, 221, 231, 238, 255, 257, 258, 260, 264, 273, 292, 297, 325, 330, 341, 363, 365, 387, 390, 396, 429
Offset: 1

Views

Author

Felix Fröhlich, Sep 18 2019

Keywords

Comments

Let b(n) = A226542(n)-1. This sequence is a supersequence of b.
Conjecture 1: Let c(n) = A001220(n)-1. This sequence is a supersequence of c.
Conjecture 2: This is a supersequence of A240719.
From Bernard Schott, Sep 19 2019: (Start)
There are 3 distinct families of terms in this sequence:
1) Integers of the form: 2^q + 1 = 11_2^q with q >= 2.
First few terms: 5, 9, 17, 33, 65, 129, ...; this is A000051 \ {2, 3}. As 11_b is not a Brazilian representation, five of these terms are not Brazilian, they are 9 and the four known Fermat primes in A019434: 5, 17, 257 and 65537; all the other terms are composite and Brazilian but in a base that is not a power of two as 65 = 11_64 = 55_12.
2) Integers of the form: m * (2^q+1) = (mm)_2^q with q >= 2 and 1 < m < 2^q.
First few terms: 10, 15, 18, 27, 34, 36, ... These numbers are Brazilian with 2 digits in a base that is a power of two >= 4 as 10 = 22_4, 15 = 33_4 or 18 = 22_8.
3) Integers of the form: m * ((2^q)^s - 1)/(2^q - 1) = (mm...m)_ 2^q with q >= 2, s >= 1 and 1 <= m <= 2^q - 1.
First few terms: 21, 42, 63, 73, 85, ... These numbers are Brazilian repdigits with 3 digits or more in a base that is a power of two >= 4 as 42 = 222_4, 73 = 111_8 or 85 = 1111_4. The repunits (4^n-1)/3, (8^n-1)/7, (16^n-1)/15, (32^n-1)/31 respectively in A002450 (when >= 5), A023001 (when >=9), A131865 (when >=17), A132469 (when >=33) are subsequences of this last family.
Remark: there exist numbers that are in this sequence for two reasons as 63 = 77_8 = 333_4. (End)

Examples

			18 written in base 8 is 22. 8 is a power of two and 22 is a repdigit, so 18 is a term of the sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = my(b=4, d=0); while(b < n, d=digits(n, b); if(vecmin(d)==vecmax(d), return(1)); b=2*b); 0
Showing 1-9 of 9 results.