OFFSET
1,3
COMMENTS
a(n) = 1 iff n+1 is prime.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
(1!+3!)/(1+3) = 7/4 is not an integer. (2!+3!)/(2+3) = 8/5 is not an integer. (3!+3!)/(3+3) = 12/6 = 2 is an integer. Thus a(3) = 3.
MATHEMATICA
lnk[n_]:=Module[{k=1, nf=n!}, While[!IntegerQ[(k!+nf)/(k+n)], k++]; k]; Array[ lnk, 90] (* Harvey P. Dale, Sep 26 2014 *)
PROG
(PARI) a(n) = for(k=1, oo, if((k!+n!)%(k+n)==0, return(k))); \\ Modified by Jinyuan Wang, Mar 13 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, May 21 2014
STATUS
approved