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.
%I A002068 M3728 N1524 #51 Jun 20 2020 11:46:48 %S A002068 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, %T A002068 57,1,30,95,71,119,56,67,94,86,151,108,21,106,48,72,159,35,147,118, %U A002068 173,180,113,131,169,107,196,214,177,73,121,170,25,277,164,231,271,259,288,110 %N A002068 Wilson remainders: a(n) = ((p-1)!+1)/p mod p, where p = prime(n). %C A002068 If this is zero, p is a Wilson prime (see A007540). %C A002068 Costa, Gerbicz, & Harvey give an efficient algorithm for computing terms of this sequence. - _Charles R Greathouse IV_, Nov 09 2012 %D A002068 R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 29. %D A002068 J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 244. %D A002068 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002068 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002068 T. D. Noe, <a href="/A002068/b002068.txt">Table of n, a(n) for n = 1..2000</a> %H A002068 Edgar Costa, Robert Gerbicz, and David Harvey, <a href="http://arxiv.org/abs/1209.3436">A search for Wilson primes</a>, arXiv:1209.3436 [math.NT], 2012. %H A002068 C.-E. Froberg, <a href="https://doi.org/10.1007/BF02591598">Investigation of the Wilson remainders in the interval 3<=p<=50,000</a>, Arkiv f. Matematik, 4 (1961), 479-481. %H A002068 J. W. L. Glaisher, <a href="http://gradelle.educanet2.ch/christian.aebi/.ws_gen/14/Glaisher_1900b.pdf">On the residues of the sums of products of the first p-1 numbers, and their powers, to modulus p^2 or p^3</a>, Quart. J. Math. Oxford 31 (1900), 321-353. %H A002068 K. Goldberg, <a href="https://doi.org/10.1112/jlms/s1-28.2.252">A table of Wilson quotients and the third Wilson prime</a>, J. London Math. Soc., 28 (1953), 252-256. %H A002068 J. Sondow, <a href="https://doi.org/10.1007/978-1-4939-1601-6_17">Lerch quotients, Lerch primes, Fermat-Wilson quotients, and the Wieferich-non-Wilson primes 2, 3, 14771</a>, In: Nathanson M. (eds) Combinatorial and Additive Number Theory. Springer Proceedings in Mathematics & Statistics, Vol. 101, Springer, New York, NY, 2014, pp. 243-255, <a href="https://arxiv.org/abs/1110.3113">preprint</a>, arXiv:1110.3113 [math.NT], 2011-2012. %F A002068 a(n) = A007619(n) mod A000040(n). %F A002068 a(n) + A197631(n) = A275741(n) for n > 1. - _Jonathan Sondow_, Jul 08 2019 %F A002068 a(n) = ( A027641(p-1)/A027642(p-1) + 1/p - 1 ) mod p, where p = prime(n), proved by Glashier (1900). - _Max Alekseyev_, Jun 20 2020 %p A002068 f:= p -> ((p-1)!+1 mod p^2)/p; %p A002068 seq(f(ithprime(i)),i=1..1000); # _Robert Israel_, Jun 15 2014 %t A002068 Table[p=Prime[n]; Mod[((p-1)!+1)/p, p], {n,100}] (* _T. D. Noe_, Mar 21 2006 *) %t A002068 Mod[((#-1)!+1)/#,#]&/@Prime[Range[70]] (* _Harvey P. Dale_, Feb 21 2020 *) %o A002068 (PARI) forprime(n=2, 10^2, m=(((n-1)!+1)/n)%n; print1(m, ", ")) \\ _Felix Fröhlich_, Jun 14 2014 %Y A002068 Cf. A007540, A007619, A275741. %K A002068 nonn,nice,easy %O A002068 1,4 %A A002068 _N. J. A. Sloane_