OFFSET
1,2
FORMULA
E.g.f.: Sum_{n>=0} ((x^n - n)^n - (-n)^n) / n!.
E.g.f.: Sum_{n>=1} x^(n^2) / n! * Sum_{k>=0} (-1)^k * (n+k)^k * x^(n*k) / k!.
...
a(n) = Sum_{d|n} (-d)^(d-n/d) * binomial(d, n/d) * n!/d! for n>=1.
EXAMPLE
E.g.f.: A(x) = x - 4*x^2/2! + 27*x^3/3! - 244*x^4/4! + 3125*x^5/5! - 47736*x^6/6! + 823543*x^7/7! - 16615936*x^8/8! + 387480969*x^9/9! - 10037800000*x^10/10! +...
such that
A(x) = x + ((x^2 - 2)^2 - 2^2)/2! + ((x^3 - 3)^3 + 3^3)/3! + ((x^4 - 4)^4 - 4^4)/4! + ((x^5 - 5)^5 + 5^5)/5! + ((x^6 - 6)^6 - 6^6)/6! + ((x^7 - 7)^7 + 7^7)/7! + ((x^8 - 8)^8 - 8^8)/8! + ((x^9 - 9)^9 + 9^9)/9! +...
Also, we have the identity related to the LambertW function:
A(x) = x*[Sum_{k>=0} (-1)^k * (k+1)^k * x^k/k!] +
x^4/2!*[Sum_{k>=0} (-1)^k * (k+2)^k * x^(2*k)/k!] +
x^9/3!*[Sum_{k>=0} (-1)^k * (k+3)^k * x^(3*k)/k!] +
x^16/4!*[Sum_{k>=0} (-1)^k * (k+4)^k * x^(4*k)/k!] +
x^25/5!*[Sum_{k>=0} (-1)^k * (k+5)^k * x^(5*k)/k!] +...
PROG
(PARI) a(n) = my(A=1); A = sum(m=1, n, x^(m^2) * sum(k=0, n, (-1)^k*(k+m)^k*x^(m*k)/k! +x*O(x^n)) / m!); n!*polcoeff(A, n)
for(n=1, 30, print1(a(n), ", "))
(PARI) a(n) = my(A=1); A = sum(m=0, n, ((x^m - m +x*O(x^n))^m - (-m)^m)/m!); if(n==0, 0, n!*polcoeff(A, n))
for(n=1, 30, print1(a(n), ", "))
(PARI) a(n) = if(n<1, 0, sumdiv(n, d, (-d)^(d-n/d) * binomial(d, n/d) * n!/d! ) )
for(n=1, 30, print1(a(n), ", "))
(PARI) /* Compare these series (informal): */
LW=serreverse(x*exp(x +O(x^26)));
sum(n=1, 26, subst(LW, x, x^n)^n/n! /(1 + subst(LW, x, x^n) ) +O(x^26))
sum(n=1, 26, ((x^n - n)^n - (-n)^n)/ n! +O(x^26))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Dec 26 2015
STATUS
approved