OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
a(6) = 6 because 5 = a(0) + a(4) = a(0) + a(5) = a(1) + a(4) = a(1) + a(5) = a(0) + a(2) + a(3) = a(1) + a(2) + a(3).
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,
b(n, i-1)+`if`(a(i)>n, 0, b(n-a(i), i-1))))
end:
a:= proc(n) a(n):= `if`(n<2, 1, b(n-1, n-1)) end:
seq(a(n), n=0..70); # Alois P. Heinz, May 26 2013
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 0, 0, b[n, i - 1] + If[a[i] > n, 0, b[n - a[i], i - 1]]]];
a[n_] := If[n < 2, 1, b[n - 1, n - 1]];
a /@ Range[0, 70] (* Jean-François Alcover, Nov 10 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 06 2000
EXTENSIONS
More terms from Naohiro Nomoto, Oct 28 2001
Extended beyond a(45) by Alois P. Heinz, May 26 2013
STATUS
approved