A378000 Array read by ascending antidiagonals: T(n,k) is the k-th positive integer that is digitally balanced in base n.
2, 11, 9, 75, 15, 10, 694, 78, 19, 12, 8345, 698, 99, 21, 35, 123717, 8350, 714, 108, 260, 37, 2177399, 123723, 8375, 722, 114, 266, 38, 44317196, 2177406, 123759, 8385, 738, 120, 268, 41, 1023456789, 44317204, 2177455, 123771, 8410, 742, 135, 278, 42
Offset: 2
Examples
Array begins: n\k| 1 2 3 4 5 ... ------------------------------------------------------------------------- 2 | 2, 9, 10, 12, 35, ... = A031443 3 | 11, 15, 19, 21, 260, ... = A049354 4 | 75, 78, 99, 108, 114, ... = A049355 5 | 694, 698, 714, 722, 738, ... = A049356 6 | 8345, 8350, 8375, 8385, 8410, ... = A049357 7 | 123717, 123723, 123759, 123771, 123807, ... = A049358 8 | 2177399, 2177406, 2177455, 2177469, 2177518, ... = A049359 9 | 44317196, 44317204, 44317268, 44317284, 44317348, ... = A049360 10 | 1023456789, 1023456798, 1023456879, 1023456897, 1023456978, ... 11 | 26432593615, 26432593625, 26432593725, 26432593745, 26432593845, ... ... | \______ A378001 (main diagonal) A049363 T(2,4) = 12 = 1100_2 is the fourth number in base 2 containing an equal amount of zeros and ones. T(9,5) = 44317348 = 102345867_9 is the fifth number in base 9 containing an equal amount of digits from 0 to 8.
Links
- Giovanni Resta, Digitally balanced numbers, Numbers Aplenty, 2013.
Crossrefs
Programs
-
Mathematica
Module[{dmax = 10, a, m}, a = Table[m = FromDigits[Join[{1, 0}, Range[2, n-1]], n] - 1; Table[While[!SameQ@@DigitCount[++m, n]]; m, dmax-n+2], {n, dmax+1, 2, -1}]; Array[Diagonal[a, # - dmax] &, dmax]]
Comments