OFFSET
0,3
COMMENTS
The encoding used here allows a lossless and human-readable compression of all partitions. To decode a term replace the zeros with commas and read the parts in bijective base 9.
The empty partition is encoded as 0.
LINKS
Alois P. Heinz, Rows n = 0..34, flattened
Wikipedia, Bijective numeration
Wikipedia, Partition (number theory)
EXAMPLE
T(6,6) = 30201 encodes the 6th partition of 6: [3,2,1].
T(10,1) = 11 encodes the 1st partition of 10: [10].
T(23,23) = 18040101 encodes the 23rd partition of 23: [17,4,1,1].
Triangle T(n,k) begins:
0;
1;
2, 101;
3, 201, 10101;
4, 301, 202, 20101, 1010101;
5, 401, 302, 30101, 20201, 2010101, 101010101;
6, 501, 402, 40101, 303, 30201, 3010101, 20202, 2020101, ...
7, 601, 502, 50101, 403, 40201, 4010101, 30301, 30202, ...
8, 701, 602, 60101, 503, 50201, 5010101, 404, 40301, 40202, ...
9, 801, 702, 70101, 603, 60201, 6010101, 504, 50301, 50202, ...
11, 901, 802, 80101, 703, 70201, 7010101, 604, 60301, 60202, ...
...
MAPLE
g:= proc(n) option remember; local d, m, l; m, l:= n, "";
while m>0 do d:= irem(m, 9, 'm');
if d=0 then d:=9; m:= m-1 fi; l:= d, l
od; parse(cat(l))
end:
b:= (n, i)-> `if`(n=0, [""], `if`(i<1, [], [map(x-> cat(
0, g(i), x), b(n-i, min(n-i, i)))[], b(n, i-1)[]])):
T:= n-> map(x-> parse(cat(0, x)), b(n$2))[]:
seq(T(n), n=0..10);
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Feb 16 2020
STATUS
approved