OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..325 (rows 1 to 25, flattened)
EXAMPLE
T(5,3) = 3 because the numbers with 5 binary digits of which 3 are 1 are 19, 21, 22, 25, 26 and 28, and the least sum of decimal digits of these is 3 (for 21).
Triangle starts:
1;
2, 3;
4, 5, 7;
8, 1, 2, 6;
7, 2, 3, 3, 4;
5, 4, 5, 6, 7, 9;
MAPLE
M:= proc(n, k) local i, R, m, r, v;
R:= ListTools:-Reverse(map(t -> 2^(n-1)+add(2^(n-1-t[i]), i=1..k-1), combinat:-choose(n-1, k-1 )));
m:= infinity;
for r in R do
v:= convert(convert(r, base, 10), `+`);
if v < m then m:= v fi;
od;
m
end proc:
for n from 1 to 12 do
seq(M(n, k), k=1..n)
od;
CROSSREFS
KEYWORD
AUTHOR
Robert Israel, May 31 2024
STATUS
approved