OFFSET
0,1
REFERENCES
G. E. Andrews, R. Askey and R. Roy, Special Functions, Cambridge, 1999; Problem 4, p. 616.
B. C. Berndt, Ramanujan's Notebooks II, Springer, 1989; p. 181, Entry 48. See also pp. 184, 193ff.
E. T. Copson, An Introduction to the Theory of Functions of a Complex Variable, Oxford Univ. Press, 1935; see p. 230, Problem 18.
S. Ramanujan, Collected Papers, edited by G. H. Hardy et al., Cambridge, 1927, pp. 323-324, Question 294.
LINKS
Robert Israel, Table of n, a(n) for n = 0..320 (0 .. 126 from G. C. Greubel and D. Turner)
J. C. W. Marsaglia, The incomplete gamma function and Ramanujan's rational approximation to exp(x), J. Statist. Comput. Simulation, 24 (1986), 163-168.
Cormac O'Sullivan, Ramanujan's approximation to the exponential function and generalizations, arXiv:2205.08504 [math.NT], 2022.
FORMULA
Define t_n by Sum_{k=0..n-1} n^k/k! + t_n*n^n/n! = exp(n)/2; then t_n ~ 1/3 + 4/(135*n) - 8/(2835*n^2) + ...
Integral_{0..infinity} exp(-x)*(1+x/n)^n dx = exp(n)*Gamma(n+1)/(2*n^n) + 2/3 - 4/(135*n) + 8/(2835*n^2) + 16/(8505*n^3) - 8992/(12629925*n^4) + ...
EXAMPLE
-2/3, 4/135, -8/2835, -16/8505, 8992/12629925, 334144/492567075, -698752/1477701225, ...
MAPLE
# Maple program from N. J. A. Sloane, Jun 23 2011, based on J. Marsaglia's 1986 paper:
a[1]:=1;
M:=20;
for n from 2 to M do
t1:=a[n-1]/(n+1)-add(a[k]*a[n+1-k], k=2..floor(n/2));
if n mod 2 = 1 then t1:=t1-a[(n+1)/2]^2/2; fi;
a[n]:=t1;
od:
map(denom, s2);
MATHEMATICA
Denominator[Table[2^n*(3*n + 2)! * Sum[ Sum[ (-1)^(j + 1)*2^i*StirlingS2[2*n + i + j + 1, j]/((2*n + i + j + 1)!*(2*n - i + 1)!*(i - j)!*(n + i + 1)), {j, 1, i}], {i, 1, 2*n+1}], {n, 0, 20}]] (* Vaclav Kotesovec, Nov 20 2015 *)
PROG
(PARI) a(n)=local(A, m); if(n<0, 0, n++; A=vector(m=2*n, k, 1); for(k=2, m, A[k]=(A[k-1]-sum(i=2, k-1, i*A[i]*A[k+1-i]))/(k+1)); denominator(A[m]*2^n*n!)) /* Michael Somos, Jun 09 2004 */
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
N. J. A. Sloane, Dec 09 2001
EXTENSIONS
Maple program edited by Robert Israel, Dec 15 2015
STATUS
approved