cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A332567 T(n,k) is the k-th partition of n in graded reverse lexicographic ordering (A080577) encoded as concatenation of parts which are represented in (zeroless) bijective base-9 numeration (A052382) and separated by zeros; triangle T(n,k), n >= 0, 1 <= k <= A000041(n), read by rows.

Original entry on oeis.org

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, 201010101, 10101010101, 7, 601, 502, 50101, 403, 40201, 4010101, 30301, 30202, 3020101, 301010101
Offset: 0

Views

Author

Alois P. Heinz, Feb 16 2020

Keywords

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.

Examples

			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, ...
  ...
		

Crossrefs

Column k=1 gives A052382 (for n>0).
Last row elements give A094028(n-1) (for n>0).

Programs

  • 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);