A067059 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.
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, 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, 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
Offset: 0
Examples
Rows start: 1, 1, 1, 1, 1, 1, ...; 1, 1, 1, 1, 1, 1, ...; 1, 1, 2, 2, 3, 3, ...; 1, 1, 2, 3, 5, 6, ...; 1, 1, 3, 5, 8, 12, ...; etc. T(4,5)=12 since 10 can be partitioned into 5+5, 5+4+1, 5+3+2, 5+3+1+1, 5+2+2+1, 4+4+2, 4+3+3, 4+4+1+1, 4+3+2+1, 4+2+2+2, 3+3+3+1, and 3+3+2+2.
Crossrefs
Programs
-
Maple
A067059 := proc(n,k) local m,a1,a2 ; a1 := 0 ; m := floor(n*k/2) ; for L in combinat[partition](m) do if nops(L) <= n then if max(op(L)) <= k then a1 := a1+1 ; end if ; end if; end do: a2 := 0 ; m := ceil(n*k/2) ; for L in combinat[partition](m) do if nops(L) <= n then if max(op(L)) <= k then a2 := a2+1 ; end if ; end if; end do: max(a1,a2) ; end proc: for d from 0 to 12 do for k from 0 to d do printf("%d,",A067059(d-k,k)) ; end do: end do: # R. J. Mathar, Nov 13 2016
-
Mathematica
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 *)
-
Sage
def A067059(n, k): return Partitions((n*k)//2, max_length=n, max_part=k).cardinality() for n in (0..9): [A067059(n,k) for k in (0..9)] # Peter Luschny, May 05 2014
Comments