OFFSET
2,2
COMMENTS
Conjecture: There exists a number k such that for all n > k, a(n) is prime. Motivation: If p is the least prime >n then all the numbers from n to p-1 divide n!. And most of the numbers from p+1 to q also divide n! where q is the least prime > p, etc. and the dividend is composite in almost all cases.
I conjecture the opposite: there are infinitely many composites in this sequence. Indeed, heuristics suggest the composites may be of density 1. - Charles R Greathouse IV, Apr 07 2013
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..1000
Amarnath Murthy, Smarandache Reciprocal Function and an elementary inequality Smarandache Notions Journal, Vol. 11, 2000.
EXAMPLE
a(5)=7 because the first values of floor(5!/k) for k=1,2,... are 120,60,40,30,24,20,17,15,13,12,... and among these the first prime number is 17, corresponding to k=7.
MAPLE
a:= proc(n) local k; for k while not isprime(floor(n!/k)) do od; k end:
seq(a(n), n=2..70); # Emeric Deutsch, Apr 18 2005
MATHEMATICA
lk[n_]:=Module[{f=n!, k=1}, While[!PrimeQ[Floor[f/k]], k++]; k]; Array[lk, 70, 2] (* Harvey P. Dale, Mar 06 2015 *)
PROG
(PARI) a(n)=my(N=n!); for(k=if(n>3, n+1, n-1), N\3+2, if(ispseudoprime(N\k), return(k))) \\ Charles R Greathouse IV, Apr 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Dec 07 2003
EXTENSIONS
More terms from Emeric Deutsch, Apr 18 2005
STATUS
approved