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-5 of 5 results.

A197634 Fermat-Wilson remainders: Fermat-Wilson quotients A197633 of non-Wilson primes p modulo p.

Original entry on oeis.org

0, 0, 6, 7, 9, 7, 1, 6, 18, 17, 30, 11, 25, 30, 24, 46, 64, 16, 18, 4, 29, 66, 95, 11, 10, 9, 8, 64, 118, 77, 136, 15, 139, 64, 105, 9, 153, 167, 93, 4, 144, 180, 67, 179, 133, 51, 145, 130, 168, 41, 25, 163, 51, 42, 43, 100, 162, 212, 235, 2, 98, 232, 22
Offset: 1

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Comments

a(n) = 0 iff the n-th non-Wilson prime is a Wieferich-non-Wilson prime A197635. For example a(1) = a(2) = 0, so the 1st and 2nd non-Wilson primes 2 and 3 are Wieferich-non-Wilson primes. The next one is 14771, which is the 1728th non-Wilson prime, so the next zero in the sequence occurs at a(1728) = 0.

Examples

			The 3rd non-Wilson prime is 7, and A197633(3) = 170578899504 == 6 (mod 7), so a(3) = 6.
		

Crossrefs

Programs

  • Mathematica
    nmax = 63; nonWilsonQ[p_] := Mod[((p-1)! + 1)/p, p] != 0; nwp = Select[ Prime[ Range[nmax + 2]], nonWilsonQ]; A197633[n_] := With[{p = nwp[[n]]}, ((((p-1)! + 1)/p)^(p-1) - 1)/p]; a[n_] := Mod[A197633[n], nwp[[n]]]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Oct 10 2012 *)

Formula

a(n) = A197633(n) mod A197636(n).
a(n) = ((((p-1)!+1)/p)^(p-1)-1)/p mod p, where p is the n-th non-Wilson prime.

A197635 Wieferich-non-Wilson primes: non-Wilson primes that divide their Fermat-Wilson quotient A197633.

Original entry on oeis.org

2, 3, 14771
Offset: 1

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Comments

A Wieferich prime base a is a prime p satisfying a^(p-1) == 1 (mod p^2). A non-Wilson prime p is called a Wieferich-non-Wilson prime if p is a Wieferich prime base w_p, where w_p = ((p-1)!+1)/p is the Wilson quotient of p.
Michael Mossinghoff has computed that if a 4th Wieferich-non-Wilson prime exists, it is > 10^7.

Examples

			The first two non-Wilson primes are 2 and 3, whose Fermat-Wilson quotients are 0. Since 2 and 3 divide 0, they are members.
The 1728th non-Wilson prime is prime(1731) = 14771, and A197634(1728) = 0, so 14771 is a member.
		

Crossrefs

Formula

A197634(A197637(a(n))) = 0.
(((p-1)!+1)/p)^(p-1) == 1 (mod p^2), where p = a(n).

A197636 Non-Wilson primes: primes p such that (p-1)! =/= -1 mod p^2.

Original entry on oeis.org

2, 3, 7, 11, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 569
Offset: 1

Views

Author

Jonathan Sondow, Oct 19 2011

Keywords

Comments

All primes except 5, 13, 563, and any other Wilson prime A007540 that may exist.
Same as primes p that do not divide their Wilson quotient ((p-1)!+1)/p.
Wilson's theorem says that (p-1)! == -1 (mod p) if and only if p is prime.
p = prime(i) is a term iff A250406(i) != 0. - Felix Fröhlich, Jan 24 2016
Complement of A007540 in A000040. - Felix Fröhlich, Jan 24 2016

Examples

			2 is a non-Wilson prime since (2-1)! = 1 ==/== -1 (mod 2^2).
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 104, Mod[Factorial[# - 1], #^2] != #^2 - 1 &] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    forprime(p=1, 500, if(Mod((p-1)!, p^2)!=-1, print1(p, ", "))) \\ Felix Fröhlich, Jan 24 2016

Formula

((p-1)!+1)/p =/= 0 (mod p), where p is prime.

A222207 Morley quotients: (2^(2*p-2) - (-1)^((p-1)/2)*binomial(p-1,(p-1)/2)) / p^3, where p = prime(n) and n >= 3.

Original entry on oeis.org

2, 12, 788, 7636, 874202, 10018884, 1445893544, 2954512034024, 38700329118256, 93229749133527532, 17540746936557672236, 243284404062970619608, 47694250379410432495952, 136236017676683906365850456, 404504597532158799519693872144, 5856120097210409121404621878992, 18102352585707069737371994385420772, 3894254646848417473467131712404310728
Offset: 3

Views

Author

Jonathan Sondow, Feb 22 2013

Keywords

Comments

Morley (1894/95) proved 2^(2*p-2) == (-1)^((p-1)/2)*binomial(p-1,(p-1)/2) mod p^3 for all primes p > 3.
Morley quotients are even, since 2^(2*p-2) and binomial(p-1,(p-1)/2) are even and p^3 is odd.

Examples

			prime(3) = 5, so a(3) = (2^(2*5-2) - (-1)^((5-1)/2)*binomial(5-1,(5-1)/2))/5^3 = (2^8 - binomial(4,2))/5^3 = (256-6)/125 = 2.
		

Crossrefs

Programs

  • Mathematica
    m[p_] := (2^(2*p-2) - (-1)^((p-1)/2)*Binomial[p-1, (p-1)/2])/p^3; Table[ m[ Prime[n]], {n, 3, 20}]

A216867 Fermat-Wilson quotients divided by their GCD.

Original entry on oeis.org

0, 0, 7107454146, 57823016899195665754121432041221505493862544313363725
Offset: 1

Views

Author

Jonathan Sondow, Sep 18 2012

Keywords

Comments

The GCD of all Fermat-Wilson quotients A197633 is 24.

Crossrefs

Cf. A197633.

Formula

a(n) = A197633(n)/24.
Showing 1-5 of 5 results.