The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A333074 Least k such that Sum_{i=0..n} (-k)^i / i! is a positive integer. 2
 1, 1, 2, 3, 4, 30, 6, 28, 120, 84, 210, 1650, 210, 11440, 6930, 630, 9240, 353430, 93450, 746130, 1616160, 746130, 1021020, 11104170, 56705880, 9722790, 48498450, 174594420, 87297210, 222071850, 2114532420, 11480905800, 5375910540, 42223261080, 5603554110, 2043061020 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Note that Sum_{i=0..n-1} (-k)^i / i! has a denominator that divides (n-1)! for n > 0. Therefore, for the expression to be an integer, (-k)^n / n! must have a denominator that divides (n-1)!. Thus, k^n is divisible by n, a(n) = k is divisible by A007947(n). a(n) is the smallest integer k such that Gamma(n+1,-k)/(n!*e^k) is a positive integer, where Gamma is the upper incomplete gamma function. - Chai Wah Wu, Apr 01 2020 LINKS FORMULA a(n) <= A034386(n). PROG (PARI) a(n) = {my(m = factorback(factorint(n)[, 1]), k = m); while(denominator(sum(i=2, n, (-k)^i/i!)) != 1, k += m); !n+k; } (Python) from functools import reduce from operator import mul from sympy import primefactors, factorial def A333074(n):     f, g = int(factorial(n)), []     for i in range(n+1):         g.append(int(f//factorial(i)))     m = 1 if n < 2 else reduce(mul, primefactors(n))     k = m     while True:         p, ki = 0, 1         for i in range(n+1):             p = (p+ki*g[i]) % f             ki = (-k*ki) % f         if p == 0:             return k         k += m # Chai Wah Wu, Apr 01 2020 CROSSREFS Cf. A000142, A007949, A034386, A332734, A333073. Sequence in context: A100604 A062931 A059614 * A241974 A226055 A028426 Adjacent sequences:  A333071 A333072 A333073 * A333075 A333076 A333077 KEYWORD nonn AUTHOR Jinyuan Wang, Mar 31 2020 EXTENSIONS a(27)-a(35) from Chai Wah Wu, Apr 01 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 23 17:41 EDT 2021. Contains 346259 sequences. (Running on oeis4.)