OFFSET
1,3
COMMENTS
LINKS
FORMULA
T(n, 1) = 1.
T(n, A301977(n)) = n.
T(2^n, k) = 2^(k-1) for any n > 0 and k = 1..n+1.
T(2^n - 1, k) = 2^k - 1 for any n > 0 and k = 1..n.
EXAMPLE
Triangle begins:
1: [1]
2: [1, 2]
3: [1, 3]
4: [1, 2, 4]
5: [1, 2, 3, 5]
6: [1, 2, 3, 6]
7: [1, 3, 7]
8: [1, 2, 4, 8]
9: [1, 2, 3, 4, 5, 9]
10: [1, 2, 3, 4, 5, 6, 10]
11: [1, 2, 3, 5, 7, 11]
12: [1, 2, 3, 4, 6, 12]
13: [1, 2, 3, 5, 6, 7, 13]
14: [1, 2, 3, 6, 7, 14]
15: [1, 3, 7, 15]
16: [1, 2, 4, 8, 16]
MAPLE
b:= proc(n) option remember; `if`(n=0, {0},
map(x-> [x, 2*x+r][], b(iquo(n, 2, 'r'))))
end:
T:= n-> sort([(b(n) minus {0})[]])[]:
seq(T(n), n=1..20); # Alois P. Heinz, Jan 26 2022
PROG
(PARI) T(n, k) = my (b=binary(n), s=Set(1)); for (i=2, #b, s = setunion(s, Set(apply(v -> 2*v+b[i], s)))); return (s[k])
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Rémy Sigrist, Mar 30 2018
STATUS
approved