login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002068 Wilson remainders: a(n) = ((p-1)!+1)/p mod p, where p = prime(n).
(Formerly M3728 N1524)
8
1, 1, 0, 5, 1, 0, 5, 2, 8, 18, 19, 7, 16, 13, 6, 34, 27, 56, 12, 69, 11, 73, 20, 70, 70, 72, 57, 1, 30, 95, 71, 119, 56, 67, 94, 86, 151, 108, 21, 106, 48, 72, 159, 35, 147, 118, 173, 180, 113, 131, 169, 107, 196, 214, 177, 73, 121, 170, 25, 277, 164, 231, 271, 259, 288, 110 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

If this is zero, p is a Wilson prime (see A007540).

Costa, Gerbicz, & Harvey give an efficient algorithm for computing terms of this sequence. - Charles R Greathouse IV, Nov 09 2012

REFERENCES

R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 29.

C.-E. Froberg, Investigation of the Wilson remainders in the interval 3<=p<=50,000, Arkiv f. Matematik, 4 (1961), 479-481.

K. Goldberg, A table of Wilson quotients and the third Wilson prime, J. London Math. Soc., 28 (1953), 252-256.

J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 244.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n = 1..2000

Edgar Costa, Robert Gerbicz, and David Harvey, A search for Wilson primes, 2012

J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, in Proceedings of CANT 2011, arXiv:1110.3113

J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, Combinatorial and Additive Number Theory, CANT 2011 and 2012, Springer Proc. in Math. & Stat., vol. 101 (2014), pp. 243-255.

FORMULA

a(n) = A007619(n) mod A000040(n).

MAPLE

f:= p -> ((p-1)!+1 mod p^2)/p;

seq(f(ithprime(i)), i=1..1000); # Robert Israel, Jun 15 2014

MATHEMATICA

Table[p=Prime[n]; Mod[((p-1)!+1)/p, p], {n, 100}] (* T. D. Noe, Mar 21 2006 *)

PROG

(PARI) forprime(n=2, 10^2, m=(((n-1)!+1)/n)%n; print1(m, ", ")) \\ Felix Fröhlich, Jun 14 2014

CROSSREFS

Cf. A007540, A007619.

Sequence in context: A021200 A265301 A019904 * A021666 A143148 A198541

Adjacent sequences:  A002065 A002066 A002067 * A002069 A002070 A002071

KEYWORD

nonn,nice,easy

AUTHOR

N. J. A. Sloane, Apr 30 1991

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 17 18:38 EDT 2017. Contains 290655 sequences.