A180284 Number of arrangements of n indistinguishable balls in n boxes with the maximum number of balls in any box equal to 4.
4, 20, 90, 392, 1652, 6804, 27600, 110715, 440374, 1740024, 6838832, 26762645, 104356980, 405706292, 1573256772, 6087597150, 23511579564, 90659983064, 349090305487, 1342531370565, 5157512878694, 19794331541270, 75905591609120, 290857683782250, 1113774550930080
Offset: 4
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 4..1716 (terms n = 4..59 from R. H. Hardin)
Crossrefs
Column 4 of A180281.
Programs
-
Maple
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i=0, 0, add(b(n-j, i-1, k), j=0..min(n, k)))) end: a:= n-> (k-> b(n$2, k)-b(n$2, k-1))(4): seq(a(n), n=4..30); # Alois P. Heinz, Aug 17 2018
-
Mathematica
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, 0, Sum[b[n - j, i - 1, k], {j, 0, Min[n, k]}]]]; a[n_] := If[n == 0, 1, b[n, n, 4] - b[n, n, 3]]; Table[a[n], {n, 4, 30}] (* Jean-François Alcover, Aug 28 2022, after Maple program *)