login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 4 12:48 EDT 2024. Contains 372243 sequences. (Running on oeis4.)