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.

A174422 1st Wieferich prime base prime(n).

Original entry on oeis.org

1093, 11, 2, 5, 71, 2, 2, 3, 13, 2, 7, 2, 2, 5
Offset: 1

Views

Author

Jonathan Sondow, Mar 19 2010

Keywords

Comments

Smallest prime p such that p^2 divides prime(n)^(p-1) - 1.
Smallest prime p such that p divides the Fermat quotient q_p((prime(n)) = (prime(n)^(p-1) - 1)/p.
See additional comments, links, and cross-refs in A039951.
a(15) = A039951(47) > 4.1*10^13.

Examples

			a(1) = 1093 is the first Wieferich prime A001220. a(2) = 11 is the first Mirimanoff prime A014127.
		

Crossrefs

Cf. A001220, A014127, A039951 = smallest prime p such that p^2 divides n^(p-1) - 1, A125636 = smallest prime p such that prime(n)^2 divides p^(prime(n)-1) - 1.
Cf. A178871 = 2nd Wieferich prime base prime(n).

Programs

  • Mathematica
    f[n_] := Block[{b = Prime@ n, p = 2}, While[ PowerMod[b, p - 1, p^2] != 1, p = NextPrime@ p]; p]; Array[f, 14]
  • PARI
    forprime(a=2, 20, forprime(p=2, 10^9, if(Mod(a, p^2)^(p-1)==1, print1(p, ", "); next({2}))); print1("--, ")) \\ Felix Fröhlich, Jun 27 2014

Formula

a(n) = A039951(prime(n)).
a(n) = 2 if and only if prime(n) == 1 (mod 4). [Jonathan Sondow, Aug 29 2010]