OFFSET
0,10
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..387
FORMULA
a(n) ~ (3*exp(13/9) - 2*exp(4/3)) * n^(n-1). - Vaclav Kotesovec, Aug 18 2017
MAPLE
b:= proc(n, m) option remember; (k-> `if`(m>k, 0,
`if`(n=0, `if`(m=k, 1, 0), add(b(n-j, ilcm(m, j))
*binomial(n-1, j-1)*(j-1)!, j=1..n))))(9)
end:
a:= n-> add(b(j, 1)*n^(n-j)*binomial(n-1, j-1), j=0..n):
seq(a(n), n=0..22);
MATHEMATICA
Unprotect[Power]; Power[0|0., 0|0.]=1; Protect[Power]; b[n_, m_]:=b[n, m]=If[m>9, 0, If[n==0, If[m==9, 1, 0], Sum[b[n - j, LCM[m, j]] Binomial[n - 1, j - 1](j - 1)!, {j, n}]]]; Table[Sum[b[j, 1]*n^(n -j) Binomial[n - 1, j - 1], {j, 0, n}], {n, 0, 25}] (* Indranil Ghosh, Aug 18 2017 *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import binomial, lcm, factorial as f
@cacheit
def b(n, m): return 0 if m>9 else (1 if m==9 else 0) if n==0 else sum([b(n - j, lcm(m, j))*binomial(n - 1, j - 1)*f(j - 1) for j in range(1, n + 1)])
def a(n): return sum([b(j, 1)*n**(n - j)*binomial(n - 1, j - 1) for j in range(n + 1)])
print([a(n) for n in range(26)]) # Indranil Ghosh, Aug 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 17 2017
STATUS
approved