login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242746
Least k > 0 such that (k!+n!)/(k+n) is an integer.
1
1, 1, 3, 1, 4, 1, 5, 3, 6, 1, 7, 1, 7, 6, 5, 1, 7, 1, 5, 4, 7, 1, 7, 6, 4, 9, 8, 1, 7, 1, 9, 8, 7, 6, 5, 1, 8, 7, 6, 1, 7, 1, 11, 10, 9, 1, 9, 8, 7, 10, 9, 1, 7, 6, 5, 7, 13, 1, 11, 1, 9, 8, 7, 8, 7, 1, 13, 12, 11, 1, 9, 1, 7, 6, 8, 8, 7, 1, 11, 10, 9, 1, 7, 6, 11, 10, 9, 1, 11
OFFSET
1,3
COMMENTS
a(n) = 1 iff n+1 is prime.
LINKS
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
Sequence in context: A259655 A221185 A378533 * A363258 A327642 A358919
KEYWORD
nonn
AUTHOR
Derek Orr, May 21 2014
STATUS
approved