OFFSET
1,2
LINKS
FORMULA
EXAMPLE
The top-left corner of the square array:
1, 2, 3, 5, 7, 10, 12, 14, ...
4, 5, 7, 10, 12, 14, 17, 19, ...
6, 8, 9, 11, 14, 17, 19, 22, ...
13, 16, 17, 19, 22, 25, 28, 31, ...
15, 19, 22, 25, 28, 31, 36, 38, ...
18, 20, 22, 25, 28, 31, 36, 38, ...
21, 24, 26, 29, 33, 35, 38, 41, ...
23, 27, 31, 36, 38, 41, 44, 47, ...
...
The non-initial terms on each row are obtained by adding to the preceding term the number of 1-bits in its binary representation (A000120).
MATHEMATICA
nmax0 = 100;
nmax := Length[col[1]];
col[1] = Table[n + DigitCount[n, 2, 1], {n, 0, nmax0}] // Complement[Range[Last[#]], #]&;
col[k_] := col[k] = col[k - 1] + DigitCount[col[k-1], 2, 1];
T[n_, k_] := col[k][[n]];
Table[T[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 28 2020 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(define (A228083bi row col) ((rowfun-for-A228083 row) col))
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Aug 09 2013
STATUS
approved