OFFSET
1,2
FORMULA
E.g.f.: -exp(3) + Sum_{n>=0} (3 + x^n)^n / n!.
a(n) = Sum_{d|n} 3^(d-n/d) * binomial(d, n/d) * n!/d! for n>=1.
EXAMPLE
E.g.f.: A(x) = x + 6*x^2/2! + 27*x^3/3! + 120*x^4/4! + 405*x^5/5! + 2538*x^6/6! + ...
where
A(x) = x*exp(3*x) + x^4*exp(3*x^2)/2! + x^9*exp(3*x^3)/3! + x^16*exp(3*x^4)/4! + x^25*exp(3*x^5)/5! + x^36*exp(3*x^6)/6! + ...
also
A(x) = -exp(3) + 1 + (3+x) + (3+x^2)^2/2! + (3+x^3)^3/3! + (3+x^4)^4/4! + (3+x^5)^5/5! + (3+x^6)^6/6! + ...
MATHEMATICA
a[n_] := DivisorSum[n, 3^(#-n/#) * Binomial[#, n/#] * n!/#! &]; Array[a, 25] (* Amiram Eldar, Aug 24 2023 *)
PROG
(PARI) {a(n) = local(A=1); A = sum(m=1, n, x^(m^2) * exp(3*x^m +x*O(x^n)) / m!); n!*polcoeff(A, n)}
for(n=1, 30, print1(a(n), ", "))
(PARI) {a(n) = local(A=1); A = -exp(3) + sum(m=0, n, (3 + x^m +x*O(x^n))^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, 3^(d-n/d) * binomial(d, n/d) * n!/d! ) )}
for(n=1, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Dec 23 2015
STATUS
approved