A300185 Irregular triangle read by rows: T(n, {j,k}) is the number of partitions of n that have exactly j parts equal to k; 1 <= j <= n, 1 <= k <= n.
1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 2, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 2, 1, 1, 0, 1, 3, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 4, 2, 2, 1, 1, 0, 1, 4, 2, 1, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 3, 0
Offset: 1
Examples
\ j 1 2 3 4 5 k n 1: 1 1 2: 1 0 1 2 1 0 3: 1 1 0 1 2 1 0 0 3 1 0 0 4: 1 1 1 0 1 2 1 1 0 0 3 1 0 0 0 4 1 0 0 0 5: 1 2 1 1 0 1 2 2 1 0 0 0 3 2 0 0 0 0 4 1 0 0 0 0 5 1 0 0 0 0 . . .
Links
- J. Stauduhar, Table of n, a(n) for n = 1..10000
- Jerome Kelleher and Barry O'Sullivan, Generating All Partitions: A Comparison Of Two Encodings, arXiv:0909.2331 [cs.DS], 2009-2014.
- J. Stauduhar, Original Python program.
Programs
-
Mathematica
Array[With[{s = IntegerPartitions[#]}, Table[Count[Map[Count[#, k] &, s], j], {k, #}, {j, #}]] &, 7] // Flatten (* Michael De Vlieger, Feb 28 2018 *)
-
Python
# See Stauduhar link.
Comments