Numbers n such that only one number m exists such that n divides m!+1.
2, 3, 5, 13, 17, 25, 31, 37, 41, 53, 73, 89, 97, 101, 107, 113, 121, 151, 157, 167, 169, 173, 181, 197, 211, 223, 229, 241, 281, 283, 313, 331, 337, 349, 353, 373, 409, 421, 433, 437, 439, 457, 487, 509, 541, 547, 551, 587, 617, 643, 653, 659, 667, 677, 701
1
When n is prime, m = n - 1; when n is composite, m < n - 1. This sequence is the union of A154554 and A256519.
T. D. Noe, Plot of 1000 terms
T. D. Noe, Table of 1000 terms
Eric W. Weisstein, MathWorld: Wilson’s Theorem
(Mma) nn = 1; t = {}; n = 1; While[Length[t] < 50, n++; cnt = 0; f = 1; Do[f = Mod[f*m, n]; If[f + 1 == n, cnt++], {m, n - 1}]; If[cnt == nn, AppendTo[t, n]]]; t
Cf. A154554, A256519, S000639, S000670-S000676.
nonn
T. D. Noe, Jun 12 2015