OFFSET
1,2
LINKS
H. Fredricksen, E. J. Ionascu, F. Luca, P. Stanica, Minimal Niven numbers, arXiv:0803.0477 [math.NT]
EXAMPLE
T(8,4) =47 because 47, written 233 in base q=4, is the smallest number with
digit sum 2+3+3=8=k in base q=4. The triangle reads T(k,q), k=1,2,...,
2<=q up to the diagonal, after which the values stay constant:
1 1 1 1 1 1 1 1 1
3 2 2 2 2 2 2 2 2
7 5 3 3 3 3 3 3 3
15 8 7 4 4 4 4 4 4
31 17 11 9 5 5 5 5 5
63 26 15 14 11 6 6 6 6
127 53 31 19 17 13 7 7 7
255 80 47 24 23 20 15 8 8
511 161 63 49 29 27 23 17 9
1023 242 127 74 35 34 31 26 19
...
MAPLE
sd := proc(n, b) local i ; add(i, i=convert(n, base, b)) ; end: T := proc(k, q) local a; for a from 1 do if sd(a, q) = k then RETURN(a) ; fi ; od: end: for k from 1 to 20 do for q from 2 to k+1 do printf("%d, ", T(k, q)) ; od: od:
CROSSREFS
KEYWORD
AUTHOR
R. J. Mathar, Mar 07 2008
STATUS
approved