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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270780 Let p_i = the i-th prime. a(i) is the smallest n>1 such that p_i divides n!-1. 2
3, 5, 9, 11, 5, 17, 4, 10, 15, 35, 39, 41, 45, 15, 18, 42, 48, 35, 17, 77, 41, 21, 43, 99, 96, 53, 22, 111, 125, 129, 120, 69, 25, 75, 155, 161, 83, 171, 177, 179, 189, 90, 195, 81, 105, 111, 82, 227, 101, 28, 239, 125, 255, 261, 267, 135, 236, 279, 141, 291 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
Since p divides (p-2)!-1, the i-th term a(i) cannot be much larger than i log i.
LINKS
EXAMPLE
For i=3, the third prime is 5, and 5 divides 3!-1.
The 7th prime is 17, and 17 divides 5!-1, so a(7)=5.
MAPLE
a:= proc(n) local k, p; p:=ithprime(n);
for k from 2 do if irem(k!, p)=1 then return k fi od
end:
seq(a(n), n=3..100); # Alois P. Heinz, Mar 23 2016
MATHEMATICA
snpd[p_]:=Module[{n=2}, While[!Divisible[n!-1, p], n++]; n]; Table[snpd[p], {p, Prime[Range[3, 70]]}] (* Harvey P. Dale, Jun 06 2017 *)
CROSSREFS
Sequence in context: A335058 A066769 A323765 * A304251 A309135 A088607
KEYWORD
nonn,look
AUTHOR
Peter Shor, Mar 22 2016
EXTENSIONS
More terms from Alois P. Heinz, Mar 23 2016
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 12:40 EDT 2024. Contains 374583 sequences. (Running on oeis4.)