OFFSET
1,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..387
FORMULA
a(n) = n^(n-1) - Sum_{i=1..n-1} n^(n-1-i)*i*a(i))
a(n) = A374562(n)/n.
EXAMPLE
1*a(1)/1^1 = 1, so a(1) = 1.
1*a(1)/2^1 + 2*a(2)/2^2 = 1, so a(2) = 1.
1*a(1)/3^1 + 2*a(2)/3^2 + 3*a(3)/3^3 = 1, so a(3)=4.
MAPLE
a:= proc(n) option remember; `if`(n<1, 0,
n^(n-1)-add(n^(n-1-i)*a(i)*i, i=1..n-1))
end:
seq(a(n), n=1..20); # Alois P. Heinz, Jul 13 2024
MATHEMATICA
a[n_]:=a[n]=n^(n-1)-Sum[n^(n-1-i)*i*a[i], {i, 1, n-1}]
PROG
(PARI) a(n)=n^(n-1)-sum(i=1, n-1, n^(n-1-i)*i*a(i))
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Jul 13 2024
STATUS
approved