%I #9 Apr 05 2020 21:21:47
%S 1,3,2,7,5,4,15,6,9,8,31,10,12,17,16,63,11,18,24,33,32,127,13,19,34,
%T 48,65,64,255,14,20,35,66,96,129,128,511,21,25,40,67,130,192,257,256,
%U 1023,22,28,49,80,131,258,384,513,512,2047,23,36,56,97,160,259
%N Rectangular array, by antidiagonals: row n gives the numbers whose base-2 digits d(m), d(m-1),...,d(0) having n as maximal run-length of 0's.
%C Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the positive integers.
%e Northwest corner:
%e 1 3 7 15 31 63 127
%e 2 5 6 10 11 13 14
%e 4 9 12 18 19 20 25
%e 8 17 24 34 35 40 49
%e 16 33 48 66 67 80 97
%e 32 65 96 130 131 160 193
%e ***
%e Base-2 digits of 72: 1,0,0,1,0,0,0 with runs 00 and 000 of 0's, so that 72 is in row 3.
%t b = 2; s[n_] := Split[IntegerDigits[n, b]];
%t m[n_, d_] := Union[Select[s[n], MemberQ[#, d] &]]
%t h[n_, d_] := Max[Map[Length, m[n, d]]]
%t z = 6000; w = t[d_] := Table[h[n, d], {n, 1, z}] /. -Infinity -> 0
%t TableForm[Table[Flatten[Position[t[0], d]], {d, 0, 8}]] (* A297932 array *)
%t u[d_] := Flatten[Position[t[0], d]]
%t v[d_, n_] := u[d][[n]];
%t Table[v[n, k - n + 1], {k, 0, 11}, {n, 0, k}] // Flatten (* A297932 sequence *)
%Y Cf. A297769, A297933.
%K nonn,base,easy,tabl
%O 1,2
%A _Clark Kimberling_, Jan 26 2018