%I #38 Jun 27 2017 20:49:12
%S 1,1,1,1,1,5,1,1,6,4,1,7,9,1,8,16,1,9,25,15,1,1,10,35,40,8,1,11,46,76,
%T 31,1,12,58,124,85,1,13,71,185,190,35,1,1,14,85,260,360,154,13,1,15,
%U 100,350,610,424,76,1,16,116,456,956,930,295
%N Irregular triangle read by rows: T(n,k) = number of ways of placing n balls into k boxes in such a way that any two adjacent boxes contain at least 4 balls.
%H Alois P. Heinz, <a href="/A259975/b259975.txt">Rows n = 0..200, flattened</a>
%H R. P. Boas & N. J. A. Sloane, <a href="/A005381/a005381.pdf">Correspondence, 1974</a>
%H D. R. Breach, <a href="/A004120/a004120.pdf">Letter to N. J. A. Sloane, Jun 1980</a>
%H M. Hayes (proposer) and D. R. Breach (solver), <a href="https://doi.org/10.1137/1012060">A combinatorial problem, Problem 68-16</a>, SIAM Rev. 12 (1970), 294-297.
%e Triangle begins:
%e 1;
%e 1;
%e 1;
%e 1;
%e 1, 5, 1;
%e 1, 6, 4;
%e 1, 7, 9;
%e 1, 8, 16;
%e 1, 9, 25, 15, 1;
%e 1, 10, 35, 40, 8;
%e 1, 11, 46, 76, 31;
%e 1, 12, 58, 124, 85;
%e 1, 13, 71, 185, 190, 35, 1;
%e 1, 14, 85, 260, 360, 154, 13;
%e 1, 15, 100, 350, 610, 424, 76;
%e ...
%p b:= proc(n, v) option remember; expand(`if`(n=0,
%p `if`(v=0, 1+x, 1), add(x*b(n-j, max(0, 4-j)), j=v..n)))
%p end:
%p T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 0)):
%p seq(T(n), n=0..20); # _Alois P. Heinz_, Jul 12 2015
%t b[n_, v_] := b[n, v] = Expand[If[n == 0, If[v == 0, 1+x, 1], Sum[x*b[n-j, Max[0, 4-j]], {j, v, n}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Feb 13 2016, after _Alois P. Heinz_ *)
%Y Columns: A004120, A005337, A005338, A005339, A005340.
%Y Row sums give A257666.
%K nonn,tabf
%O 0,6
%A _N. J. A. Sloane_, Jul 12 2015
%E More terms from _Alois P. Heinz_, Jul 12 2015