cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A344838 #9 May 31 2021 02:11:35
%S A344838 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,
%T A344838 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,
%U A344838 10,9,12,7,6,6,7,12,9,10,11,12,11,10,12,8,7,6,7,8,12,10,11,12
%N 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).
%C A344838 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.
%H A344838 Rémy Sigrist, <a href="/A344838/b344838.txt">Table of n, a(n) for n = 0..10010</a>
%H A344838 Rémy Sigrist, <a href="/A344838/a344838.png">Colored representation of the table for n, k < 2^10</a>
%F A344838 T(n, k) = T(k, n).
%F A344838 T(m, T(n, k)) = T(T(m, n), k).
%F A344838 T(n, n) = n.
%F A344838 T(n, 0) = n.
%F A344838 T(n, 1) = max(1, n).
%e A344838 Array T(n, k) begins:
%e A344838   n\k|   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A344838   ---+----------------------------------------------------------------
%e A344838     0|   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A344838     1|   1   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A344838     2|   2   2   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A344838     3|   3   3   3   3   6   6   6   7  12  12  12  12  12  13  14  15
%e A344838     4|   4   4   4   6   4   5   6   7   8   9  10  11  12  13  14  15
%e A344838     5|   5   5   5   6   5   5   6   7  10  10  10  11  12  13  14  15
%e A344838     6|   6   6   6   6   6   6   6   7  12  12  12  12  12  13  14  15
%e A344838     7|   7   7   7   7   7   7   7   7  14  14  14  14  14  14  14  15
%e A344838     8|   8   8   8  12   8  10  12  14   8   9  10  11  12  13  14  15
%e A344838     9|   9   9   9  12   9  10  12  14   9   9  10  11  12  13  14  15
%e A344838    10|  10  10  10  12  10  10  12  14  10  10  10  11  12  13  14  15
%e A344838    11|  11  11  11  12  11  11  12  14  11  11  11  11  12  13  14  15
%e A344838    12|  12  12  12  12  12  12  12  14  12  12  12  12  12  13  14  15
%e A344838    13|  13  13  13  13  13  13  13  14  13  13  13  13  13  13  14  15
%e A344838    14|  14  14  14  14  14  14  14  14  14  14  14  14  14  14  14  15
%e A344838    15|  15  15  15  15  15  15  15  15  15  15  15  15  15  15  15  15
%o A344838 (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))) }
%Y A344838 Cf. A003984, A070939.
%Y A344838 Cf. A344834 (AND), A344835 (OR), A344836 (XOR), A344837 (min), A344839 (absolute difference).
%K A344838 nonn,base,tabl
%O A344838 0,4
%A A344838 _Rémy Sigrist_, May 29 2021