OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Lambert W-Function
Wikipedia, Lambert W function
FORMULA
EXAMPLE
x - 2*x^2 + 9*x^3 - 64*x^4 + 625*x^5 - 7776*x^6 + 117649*x^7 + ...
MAPLE
a := proc(n); `if`( n<0, 0, n! * coeff( taylor( LambertW(x), x=0, n+1 ), x, n)); end;
MATHEMATICA
a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ ProductLog @ z, {z, 0, n}]]
Table[(-n)^(n-1), {n, 30}] (* Harvey P. Dale, Apr 29 2013 *)
PROG
(PARI) {a(n) = if( n<1, 0, (-n) ^ (n-1))}
(PARI) {a(n) = if( n<1, 0, n! * polcoeff( serreverse( x * exp(x + x * O(x^n))), n))}
(PARI) {a(n) = local(A); if( n<1, 0, A = O(x); for( k=1, n, A = x / exp(A)); n! * polcoeff( A, n))}
(Magma) [(-n)^(n-1) : n in [1..20]]; // Wesley Ivan Hurt, Jan 17 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Jun 07 2012
STATUS
approved