OFFSET
0,2
LINKS
EXAMPLE
: a(0) = 1:
: o
: //( )\\
: N N N N N N
:
: a(1) = 2:
: o o
: / \ / /|\ \
: o N o N N N N
: / /|\ \ ( )
: N N N N N N N
:
: a(2) = 7:
: o o o o
: / \ / \ /( )\ / | \
: o N o N o N N N o N N
: / \ /( )\ / \ /( )\
: o N o N N N o N N N N N
: /( )\ ( ) ( )
: N N N N N N N N
:
: o o o
: / \ /( )\ / ( \ \
: o o o N N N o o N N
: /( )\ ( ) /|\ ( ) ( )
: N N N N N N N N N N N N N
:
MAPLE
b:= proc(n, i, v, k) option remember; `if`(n=0,
`if`(v=0, 1, 0), `if`(i<1 or v<1 or n<v, 0,
`if`(v=n, 1, add(binomial(A(i, k)+j-1, j)*
b(n-i*j, i-1, v-j, k), j=0..min(n/i, v)))))
end:
A:= proc(n, k) option remember; `if`(n<2, n,
add(b(n, n+1-j, j, k), j=2..min(n, k)))
end:
a:= n-> A(2*n+3, n+3)-A(2*n+3, n+2):
seq(a(n), n=0..23);
MATHEMATICA
b[n_, i_, v_, k_] := b[n, i, v, k] = If[n == 0,
If[v == 0, 1, 0], If[i < 1 || v < 1 || n < v, 0,
If[v == n, 1, Sum[Binomial[A[i, k] + j - 1, j]*
b[n - i*j, i - 1, v - j, k], {j, 0, Min[n/i, v]}]]]];
A[n_, k_] := A[n, k] = If[n < 2, n,
Sum[b[n, n + 1 - j, j, k], {j, 2, Min[n, k]}]];
a[n_] := A[2*n + 3, n + 3] - A[2*n + 3, n + 2];
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Feb 28 2024, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 08 2017
STATUS
approved