editing
approved
editing
approved
For n>0: a(n) is the number of compositions of n-1 into n-1 nonnegative parts such that the i-th part i is not larger than i. a(4) = 6: [0,0,3], [0,1,2], [0,2,1], [1,0,2], [1,1,1], [1,2,0]. - Alois P. Heinz, Jun 26 2023
approved
editing
editing
approved
For n>0: a(n) is the number of compositions of n-1 into n-1 nonnegative parts such that part i is not larger than i. a(4) = 6: [0,0,3], [0,1,2], [0,2,1], [1,0,2], [1,1,1], [1,2,0]. - Alois P. Heinz, Jun 26 2023
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0,
`if`(n=0, 1, add(b(n-j, i-1), j=0..min(n, i))))
end:
a:= n-> b(n-1$2):
seq(a(n), n=1..27); # Alois P. Heinz, Jun 26 2023
approved
editing
Alois P. Heinz, <a href="/A000707/b000707_1.txt">Table of n, a(n) for n = 1..1665</a>
editing
approved
Alois P. Heinz, <a href="/A000707/b000707_1.txt">Table of n, a(n) for n = 1..10001665</a>
approved
editing
reviewed
approved
proposed
reviewed