editing
approved
editing
approved
o o o o o
| | | | / \
| | | | / \
1 1 2 2 1 2
| | | |
| | | |
1 2 1 2
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
A[n_, k_] := A[n, k] = If[n < 2, n, Sum[A[n-j, k]*Sum[
k*A[d, k]*d*(-1)^(j/d+1), {d, Divisors[j]}], {j, 1, n-1}]/(n-1)];
a[n_] := A[n+1, n];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 29 2022, after Alois P. Heinz *)
approved
editing
editing
approved
a(2) = 5:
o o o o o
| | | | / \
1 1 2 2 1 2
| | | |
1 2 1 2
approved
editing
editing
approved
Alois P. Heinz, <a href="/A255523/b255523.txt">Table of n, a(n) for n = 0..300</a>
with(numtheory):
A:= proc(n, k) option remember; `if`(n<2, n, add(A(n-j, k)*add(
k*A(d, k)*d*(-1)^(j/d+1), d=divisors(j)), j=1..n-1)/(n-1))
end:
a:= n-> A(n+1, n):
seq(a(n), n=0..25);