OFFSET
0,4
FORMULA
a(n) = Sum_{d divides n, 1<=d<=n} -d*(-a(d-1))^(n/d) for n>0 with a(0)=1.
Product_{n>=1} (1 + a(n-1)*x^n) = g.f. of A157312.
EXAMPLE
Define G(x) by the exponential:
G(x) = exp(x + x^2/2 + 4*x^3/3 + 13*x^4/4 + 66*x^5/5 + 394*x^6/6 +...)
then G(x) also equals the product:
G(x) = (1 + x)(1 + x^2)(1 + x^3)(1 + 4*x^4)(1 + 13*x^5)(1 + 66*x^6)*...;
where the coefficients in both expressions are the same (with offset)
and G(x) is the g.f. of A157312:
G(x) = 1 + x + x^2 + 2*x^3 + 5*x^4 + 18*x^5 + 84*x^6 + 481*x^7 + 3249*x^8 +...
MATHEMATICA
a[0] = 1; a[n_] := a[n] = DivisorSum[n, -# * (-a[#-1])^(n/#) &]; Array[a, 20, 0] (* Amiram Eldar, Aug 15 2023 *)
PROG
(PARI) {a(n)=if(n==0, 1, sumdiv(n, d, if(d>=1&d<=n, -d*(-a(d-1))^(n/d))))}
(PARI) {a(n)=if(n==0, 1, n*polcoeff(1+sum(k=1, n, log(1+a(k-1)*x^k +x*O(x^n))), n))}
(PARI) {a(n)=if(n==0, 1, n*polcoeff(sum(k=1, n, -sum(j=1, n\k, (-a(k-1))^j*x^(k*j)/j)+x*O(x^n)), n))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Mar 10 2009
STATUS
approved