login
A371470
Triangle read by rows: for 1 <= k <= n, T(n,k) is the least sum of decimal digits of numbers with n binary digits and binary weight k.
2
1, 2, 3, 4, 5, 7, 8, 1, 2, 6, 7, 2, 3, 3, 4, 5, 4, 5, 6, 7, 9, 10, 8, 1, 2, 2, 3, 10, 11, 4, 2, 3, 4, 5, 7, 12, 13, 5, 4, 3, 4, 5, 6, 6, 7, 8, 7, 8, 6, 7, 1, 2, 3, 4, 6, 7, 5, 4, 2, 3, 2, 3, 3, 4, 6, 13, 14, 6, 5, 3, 4, 4, 3, 4, 6, 7, 8, 18, 19, 5, 6, 6, 5, 6, 6, 6, 7, 8, 9, 14, 19, 20, 7, 8, 5
OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..325 (rows 1 to 25, flattened)
FORMULA
a(n) = A007953(A373289(n)).
T(A123384(i),A118738(i)) = 1.
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
nonn,base,tabl
AUTHOR
Robert Israel, May 31 2024
STATUS
approved