The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A250406 Values of B such that p = prime(n) satisfies (p-1)! == -1-B*p (mod p^2), i.e., p is a near-Wilson prime. 8
 1, 2, 0, 2, 10, 0, 12, 17, 15, 11, 12, 30, 25, 30, 41, 19, 32, 5, 55, 2, 62, 6, 63, 19, 27, 29, 46, 106, 79, 18, 56, 12, 81, 72, 55, 65, 6, 55, 146, 67, 131, 109, 32, 158, 50, 81, 38, 43, 114, 98, 64, 132, 45, 37, 80, 190, 148, 101, 252, 4, 119, 62, 36, 52, 25 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS p is in A007540 iff a(n) == 0. LINKS Robert G. Wilson v, Table of n, a(n) for n = 1..1000 E. Costa, R. Gerbicz and D. Harvey, A search for Wilson primes, Math. Comp., 83 (2014), 3071-3091. R. Crandall, K. Dilcher and C. Pomerance, A search for Wieferich and Wilson primes, Math. Comp., 66 (1997), 433-449. MATHEMATICA f[n_] := Block[{k = 0, m, p = Prime[n]}, m = Mod[(p - 1)!, p^2]; While[ Mod[-1 - k*p, p^2] != m, k++]; k]; Array[f, 70] (* Robert G. Wilson v, Dec 03 2014 *) PROG (PARI) forprime(p=1, 1e9, b=0; while(Mod((p-1)!, p^2)!=-1-b*p, b++); print1(b, ", ")) CROSSREFS Cf. A007540, A241014, A244801, A250407. Sequence in context: A220234 A038020 A211910 * A107094 A122496 A335756 Adjacent sequences:  A250403 A250404 A250405 * A250407 A250408 A250409 KEYWORD nonn AUTHOR Felix FrÃ¶hlich, Nov 22 2014 STATUS approved

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

Last modified July 3 16:27 EDT 2022. Contains 355055 sequences. (Running on oeis4.)