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

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115092 The number of m such that prime(n) divides m!+1. 5
1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 1, 2, 2, 1, 4, 4, 3, 7, 1, 4, 4, 1, 1, 1, 3, 1, 2, 1, 2, 2, 4, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 5, 1, 2, 2, 1, 3, 3, 2, 3, 3, 2, 1, 1, 5, 4, 2, 1, 3, 1, 1, 2, 1, 1, 2, 2, 1, 3, 4, 3, 4, 6, 1, 3, 1, 3, 1, 1, 2, 2, 1, 2, 3, 3, 4, 1, 2, 2, 4, 1, 3, 2, 1, 1, 2, 4, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

By Wilson's theorem, we know that for each prime p there is at least one m such that p divides m!+1. The largest such m is p-1. Sequence A073944 lists the smallest m for each prime.

LINKS

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

EXAMPLE

a(20)=7 because 71, the 20th prime, divides m!+1 for the seven values m=7,9,19,51,61,63,70. Interesting, note that 7+63=9+61=19+51=70.

MATHEMATICA

Table[p=Prime[i]; cnt=0; f=1; Do[f=Mod[f*m, p]; If[f+1==p, cnt++ ], {m, p-1}]; cnt, {i, 150}]

PROG

(PARI) a(n, p=prime(n))=my(t=Mod(1, p)); sum(k=1, p-1, t*=k; t==-1) \\ Charles R Greathouse IV, May 15 2015

CROSSREFS

Sequence in context: A207324 A103343 A085263 * A172281 A304945 A176298

Adjacent sequences:  A115089 A115090 A115091 * A115093 A115094 A115095

KEYWORD

nonn

AUTHOR

T. D. Noe, Mar 01 2006

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 20:27 EST 2019. Contains 329849 sequences. (Running on oeis4.)