OFFSET
3,2
LINKS
Giovanni Resta, Table of n, a(n) for n = 3..350
EXAMPLE
6!/1-1 (719) and 6!/1+1 (721) are not both prime. 6!/2-1 (359) and 6!/2+1 (361) are not both prime. 6!/3-1 (239) and 6!/3+1 (241) are both prime. thus, a(6) = 3.
MATHEMATICA
lnk[n_]:=Module[{nf=n!, k=1}, While[!AllTrue[nf/k+{1, -1}, PrimeQ], k++]; k]; Array[lnk, 70, 3] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 18 2015 *)
PROG
(PARI) f(n)=for(k=1, n!, if(floor(n!/k-1)==n!/k-1 && floor(n!/k+1)==n!/k+1, if(ispseudoprime(n!/k-1) && ispseudoprime(n!/k+1), return(k))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Apr 02 2014
STATUS
approved