OFFSET
0,8
COMMENTS
REFERENCES
E. T. Copson, An Introduction to the Theory of Functions of a Complex Variable, 1935, Oxford University Press, p. 221.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..100
J. M. Borwein and R. M. Corless, Emerging Tools for Experimental Mathematics, Amer. Math. Monthly, 106 (No. 10, 1999), 889-909.
G. Marsaglia and J. C. W. Marsaglia, A new derivation of Stirling's approximation to n!, Amer. Math. Monthly, 97 (1990), 827-829.
NIST Digital Library of Mathematical Functions, Lambert W-Function, section 4.13.7
J. C. W. Marsaglia, The incomplete gamma function and Ramanujan's rational approximation to exp(x), J. Statist. Comput. Simulation, 24 (1986), 163-168. [N. J. A. Sloane, Jun 23 2011]
EXAMPLE
MAPLE
h := proc(k) option remember; local j; `if`(k<=0, 1, (h(k-1)/k-add((h(k-j)*h(j))/(j+1), j=1..k-1))/(1+1/(k+1))) end:
A005447 := n -> `if`(n<4, 1, `if`(n=4, -1, numer(h(n-1))));
seq(A005447(i), i=0..24); # Peter Luschny, Feb 08 2011
# other program
a[1]:=1;
M:=25;
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:
s1:=[seq(a[n], n=1..M)]; # N. J. A. Sloane, Jun 23 2011, based on J. Marsaglia's 1986 paper
MATHEMATICA
terms = 25; Assuming[x > 0, -ProductLog[-1, -Exp[-1 - x^2/2]] + O[x]^terms] // CoefficientList[#, x]& // Take[#, terms]& // Numerator (* Jean-François Alcover, Jun 20 2013, updated Feb 21 2018 *)
a[ n_] := If[ n < 0, 0, Block[ {$Assumptions = x < 0}, SeriesCoefficient[ -ProductLog[ -Exp[-1 - x^2/2]], {x, 0, n}] // Numerator]]; (* Michael Somos, Oct 06 2017 *)
PROG
(PARI) {a(n) = my(A); if( n<1, n==0, A = vector(n, k, 1); for(k=2, n, A[k] = (A[k-1] - sum(i=2, k-1, i * A[i] * A[k+1-i])) / (k+1)); numerator(A[n]))}; /* Michael Somos, Jun 09 2004 */
(PARI) {a(n) = if( n<1, n==0, numerator( polcoeff( serreverse(sqrt( 2 * (x - log(1 + x + x^2 * O(x^n))))), n)))}; /* Michael Somos, Jun 09 2004 */
(SageMath)
@CachedFunction
def h(n): return 1 if (n<1) else ((n+1)/(n+2))*( h(n-1)/n - sum( h(n-j)*h(j)/(j+1) for j in range(1, n) ))
def A005447(n):
if (n<4): return 1
elif (n==4): return -1
else: return numerator(h(n-1))
[A005447(n) for n in range(31)] # G. C. Greubel, Nov 21 2022
CROSSREFS
KEYWORD
sign,frac
AUTHOR
EXTENSIONS
Edited by Michael Somos, Jul 21 2002
STATUS
approved