login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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.
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
Cf. A344834 (AND), A344835 (OR), A344836 (XOR), A344837 (min), A344839 (absolute difference).
Sequence in context: A231205 A003984 A087061 * A344835 A082860 A342859
KEYWORD
nonn,base,tabl
AUTHOR
Rémy Sigrist, May 29 2021
STATUS
approved