OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
MAPLE
b:= proc(n, i, p, d) option remember; `if`(n=0, ilcm(p, d),
add(b(n-i*j, i-1, p+j, d+signum(j)), j=`if`(i>1, 0..n/i, n)))
end:
a:= n-> b(n$2, 0$2):
seq(a(n), n=0..50);
MATHEMATICA
b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, LCM[p, d],
Sum[b[n - i*j, i - 1, p + j, d + Sign[j]],
{j, If[i > 1, Range[0, n/i], {n}]}]];
a[n_] := b[n, n, 0, 0];
a /@ Range[0, 50] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 02 2020
STATUS
approved