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!)
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 (list; graph; refs; listen; history; text; internal format)
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: A166050 A259655 A221185 * A363258 A327642 A358919
KEYWORD
nonn
AUTHOR
Derek Orr, May 21 2014
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 March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)