|
|
A344838
|
|
Square array T(n, k), n, k >= 0, read by antidiagonals; T(n, k) = max(n * 2^max(0, w(k)-w(n)), k * 2^max(0, w(n)-w(k))) (where w = A070939).
|
|
6
|
|
|
0, 1, 1, 2, 1, 2, 3, 2, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 6, 6, 5, 6, 7, 8, 7, 6, 6, 4, 6, 6, 7, 8, 9, 8, 7, 6, 5, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11, 10, 9, 12, 7, 6, 6, 7, 12, 9, 10, 11, 12, 11, 10, 12, 8, 7, 6, 7, 8, 12, 10, 11, 12
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
In other words, we right pad the binary expansion of the lesser of n and k with zeros (provided it is positive) so that both numbers have the same number of binary digits, and then take the greatest value.
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, n) = n.
T(n, 0) = n.
T(n, 1) = max(1, n).
|
|
EXAMPLE
|
Array T(n, k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
---+----------------------------------------------------------------
0| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1| 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
2| 2 2 2 3 4 5 6 7 8 9 10 11 12 13 14 15
3| 3 3 3 3 6 6 6 7 12 12 12 12 12 13 14 15
4| 4 4 4 6 4 5 6 7 8 9 10 11 12 13 14 15
5| 5 5 5 6 5 5 6 7 10 10 10 11 12 13 14 15
6| 6 6 6 6 6 6 6 7 12 12 12 12 12 13 14 15
7| 7 7 7 7 7 7 7 7 14 14 14 14 14 14 14 15
8| 8 8 8 12 8 10 12 14 8 9 10 11 12 13 14 15
9| 9 9 9 12 9 10 12 14 9 9 10 11 12 13 14 15
10| 10 10 10 12 10 10 12 14 10 10 10 11 12 13 14 15
11| 11 11 11 12 11 11 12 14 11 11 11 11 12 13 14 15
12| 12 12 12 12 12 12 12 14 12 12 12 12 12 13 14 15
13| 13 13 13 13 13 13 13 14 13 13 13 13 13 13 14 15
14| 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15
15| 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15
|
|
PROG
|
(PARI) T(n, k, op=max, w=m->#binary(m)) = { op(n*2^max(0, w(k)-w(n)), k*2^max(0, w(n)-w(k))) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|