OFFSET
1,2
COMMENTS
Leading zeros are ignored.
Will every positive integer appear?
LINKS
Rémy Sigrist, C++ program
EXAMPLE
Array A(n, k) begins:
n\k| 1 2 3 4 5 6 7 8
---+------------------------------------------------------------
1| 1 2 3 11 32 111 212 213
2| 12 31 13 21 112 122 131 14
3| 123 113 211 121 22 1311 4 1511
4| 1231 132 1112 1221 311 41 5 11113
5| 12311 321 1121 221 3114 15111 1312 1122
6| 123113 2111 2122 13114 151111 312 11221 13111
7| 1231132 11121 2213 1141 51 11131 21122 113111
8| 12311321 11212 2131 141 511 11312 112211 311111
.
Array A(n, k), with digits vertically aligned, begins:
+-+-+-+---+---+-----+-----+-----+-----+---+-------+-------+---------+
|1|2|3|1 1|3 2|1 1 1|2 1 2|2 1 3|1 1 4|1 5|1 1 1 1|3 1 2 1|1 2 2 1 1|
+-+-+-+-+-+-+-+-+---+-+---+-+---+-+---+---+-+-----+-+-----+-+-------+
|1 2|3 1|1 3|2 1|1 1 2|1 2 2|1 3 1|1 4|1 5 1|1 1 1 3|1 2 1 1|2 2 1 1|
+---+-+-+---+---+-+---+-+---+-----+-+-+-----+-+-----+-+-----+-+-----+
|1 2 3|1 1 3|2 1 1|1 2 1|2 2|1 3 1 1|4|1 5 1 1|1 1 3 1|2 1 1 2|
+-----+-+---+-+---+---+-+---+-+-----+-+-+-+---+-----+-+-------+
|1 2 3 1|1 3 2|1 1 1 2|1 2 2 1|3 1 1|4 1|5|1 1 1 1 3|1 2 1 1 2|
+-------+-+---+-+-----+-+-----+-----+-+-+-+-----+---+---+-----+-+
|1 2 3 1 1|3 2 1|1 1 2 1|2 2 1|3 1 1 4|1 5 1 1 1|1 3 1 2|1 1 2 2|
+---------+-+---+---+---+---+-+-------+---------+-+-----+-------+-+
|1 2 3 1 1 3|2 1 1 1|2 1 2 2|1 3 1 1 4|1 5 1 1 1 1|3 1 2|1 1 2 2 1|
+-----------+-+-----+---+---+---+-----+-+---+-----+---+-+-------+-+
|1 2 3 1 1 3 2|1 1 1 2 1|2 2 1 3|1 1 4 1|5 1|1 1 1 3 1|2 1 1 2 2|
+-------------+-+-------+-+-----+-+-----+---+-+-------+-+-------+---+
|1 2 3 1 1 3 2 1|1 1 2 1 2|2 1 3 1|1 4 1|5 1 1|1 1 3 1 2|1 1 2 2 1 1|
+---------------+---------+-------+-----+-----+---------+-----------+
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jun 28 2023
STATUS
approved