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)*e^k/n! is a positive integer, where Gamma is the upper incomplete gamma function. - Chai Wah Wu, Apr 02 2020
LINKS
Bert Dobbelaere, Table of n, a(n) for n = 0..100
FORMULA
a(n) <= A034386(n).
EXAMPLE
For n = 4, k > 0 if Sum_{i=0..4} k^i / i! is positive. a(4) = 2 since 1 + 1/1 + 1/2 + 1/6 + 1/24 = 65/24 is not an integer and 1 + 2/1 + 4/2 + 8/6 + 16/24 = 7 is an integer.
PROG
(PARI) a(n) = for(k=1, oo, if((s=sum(i=2, n, k^i/i!))==floor(s), return(k)));
(PARI) a(n) = {if (n==0, return (1)); my(m = factorback(factorint(n)[, 1]), k = m); while (denominator(sum(i=0, n, k^i/i!)) != 1, k += m); k; } \\ Michel Marcus, Mar 06 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 06 2020
EXTENSIONS
a(24)-a(30) from Michel Marcus, Mar 06 2020
More terms from Bert Dobbelaere, Mar 09 2020
STATUS
approved