%I #22 Nov 13 2016 08:16:55
%S 1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,2,1,1,1,1,3,3,3,1,1,1,1,3,5,5,3,
%T 1,1,1,1,4,6,8,6,4,1,1,1,1,4,8,12,12,8,4,1,1,1,1,5,10,18,20,18,10,5,1,
%U 1,1,1,5,13,24,32,32,24,13,5,1,1,1,1,6,15,33,49,58,49,33,15,6,1,1,1,1,6
%N Square array read by antidiagonals of partitions which half fill an n*k box, i.e., partitions of floor(nk/2) or ceiling(nk/2) into up to n positive integers, each no more than k.
%C The number of partitions of m into up to n positive integers each no more than k is maximized for given n and k by m=floor(nk/2) or ceiling(nk/2) (and possibly some other values).
%e Rows start:
%e 1, 1, 1, 1, 1, 1, ...;
%e 1, 1, 1, 1, 1, 1, ...;
%e 1, 1, 2, 2, 3, 3, ...;
%e 1, 1, 2, 3, 5, 6, ...;
%e 1, 1, 3, 5, 8, 12, ...; etc.
%e T(4,5)=12 since 10 can be partitioned into
%e 5+5, 5+4+1, 5+3+2, 5+3+1+1, 5+2+2+1, 4+4+2, 4+3+3,
%e 4+4+1+1, 4+3+2+1, 4+2+2+2, 3+3+3+1, and 3+3+2+2.
%p A067059 := proc(n,k)
%p local m,a1,a2 ;
%p a1 := 0 ;
%p m := floor(n*k/2) ;
%p for L in combinat[partition](m) do
%p if nops(L) <= n then
%p if max(op(L)) <= k then
%p a1 := a1+1 ;
%p end if ;
%p end if;
%p end do:
%p a2 := 0 ;
%p m := ceil(n*k/2) ;
%p for L in combinat[partition](m) do
%p if nops(L) <= n then
%p if max(op(L)) <= k then
%p a2 := a2+1 ;
%p end if ;
%p end if;
%p end do:
%p max(a1,a2) ;
%p end proc:
%p for d from 0 to 12 do
%p for k from 0 to d do
%p printf("%d,",A067059(d-k,k)) ;
%p end do:
%p end do: # _R. J. Mathar_, Nov 13 2016
%t t[n_, k_] := Length[ IntegerPartitions[ Floor[n*k/2], n, Range[k]]]; Flatten[ Table[ t[n-k , k], {n, 0, 13}, {k, 0, n}]] (* _Jean-François Alcover_, Jan 02 2012 *)
%o (Sage)
%o def A067059(n, k):
%o return Partitions((n*k)//2, max_length=n, max_part=k).cardinality()
%o for n in (0..9): [A067059(n,k) for k in (0..9)] # _Peter Luschny_, May 05 2014
%Y As this is symmetric, rows and columns each include A000012 twice, A008619, A001971, A001973, A001975, A001977, A001979 and A001981. Diagonal is A029895. T(n, n*(n-1)) is the magic series A052456.
%K nonn,tabl
%O 0,13
%A _Henry Bottomley_, Feb 17 2002