login
A073944
a(n) is the smallest m such that n-th prime divides m! + 1.
5
1, 2, 4, 3, 5, 12, 16, 9, 14, 18, 30, 36, 40, 21, 23, 52, 15, 8, 18, 7, 72, 23, 13, 88, 96, 100, 6, 106, 86, 112, 63, 65, 16, 16, 50, 150, 156, 81, 166, 172, 89, 180, 95, 102, 196, 99, 210, 222, 61, 228, 64, 210, 240, 97, 31, 131, 9, 93, 40, 280, 282, 45, 63, 220, 312
OFFSET
1,2
COMMENTS
Essentially the same as A072937. - R. J. Mathar, Sep 23 2008
By Wilson's theorem, a(n) < prime(n). Sequence A115092 gives the number of m such that prime(n) divides m!+1. - T. D. Noe, Mar 01 2006, Jan 10 2009
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..10000 (first 2000 terms from T. D. Noe)
MATHEMATICA
Table[p=Prime[i]; m=1; While[m<p && Mod[m!+1, p]>0, m++ ]; m, {i, 100}] (* T. D. Noe, Mar 01 2006 *)
Module[{sm=Table[{m, m!+1}, {m, 400}]}, Table[SelectFirst[sm, Mod[#[[2]], p]==0&], {p, Prime[ Range[70]]}]][[;; , 1]] (* Harvey P. Dale, Sep 15 2023 *)
CROSSREFS
Cf. A038507.
Cf. A072937 (same sequence without a(1)).
Sequence in context: A297706 A374799 A093416 * A072937 A343312 A256640
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Nov 13 2002
STATUS
approved