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.

A270776 Smallest non-Wieferich prime to base n, i.e., smallest prime p such that n^(p-1) != 1 (mod p^2).

Original entry on oeis.org

2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2
Offset: 2

Views

Author

Felix Fröhlich, Mar 22 2016

Keywords

Comments

A256236 gives the smallest i such that a(i) = A000040(n).
a(n) > 2 iff A039951(n) = 2.
a(n) > 3 iff A268352(n) = 3.
Does every prime appear in the sequence?
It is easy to see that the answer to the previous question is "yes" if and only if A256236 is infinite.
The ABC-(k, Epsilon) conjecture with k >= 2 and Epsilon > 0 such that 1/(1/Epsilon + 1) + 1/k <= log(2)/(24*log(a)) implies that a(n) exists for all n (cf. Broughan, 2006; theorem 5.6).

Examples

			The sequence of base-17 Wieferich primes (A128668) starts 2, 3, 46021. Thus the smallest non-Wieferich prime to base 17 is 5 and hence a(17) = 5.
		

Crossrefs

Programs

  • Mathematica
    A270776[n_] := NestWhile[#+1 &, 2, CompositeQ[#] || PowerMod[n, #-1, #^2] == 1 &];
    Array[A270776, 100, 2] (* Paolo Xausa, Aug 15 2025 *)
  • PARI
    a(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)!=1, return(p)))