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.

A344839 Square array T(n, k), n, k >= 0, read by antidiagonals; T(n, k) = abs(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 A344839 #10 May 31 2021 02:11:39
%S A344839 0,1,1,2,0,2,3,0,0,3,4,1,0,1,4,5,0,1,1,0,5,6,1,0,0,0,1,6,7,2,1,2,2,1,
%T A344839 2,7,8,3,2,1,0,1,2,3,8,9,0,3,0,1,1,0,3,0,9,10,1,0,1,2,0,2,1,0,1,10,11,
%U A344839 2,1,4,3,1,1,3,4,1,2,11,12,3,2,3,0,2,0,2,0,3,2,3,12
%N A344839 Square array T(n, k), n, k >= 0, read by antidiagonals; T(n, k) = abs(n * 2^max(0, w(k)-w(n)) - k * 2^max(0, w(n)-w(k))) (where w = A070939).
%C A344839 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 absolute difference.
%H A344839 Rémy Sigrist, <a href="/A344839/b344839.txt">Table of n, a(n) for n = 0..10010</a>
%H A344839 Rémy Sigrist, <a href="/A344839/a344839_1.png">Colored representation of the table for n, k < 2^10</a>
%F A344839 T(n, k) = T(k, n).
%F A344839 T(n, n) = 0.
%F A344839 T(n, 0) = n.
%F A344839 T(n, 1) = A053645(n) for any n > 0.
%e A344839 Array T(n, k) begins:
%e A344839   n\k|   0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
%e A344839   ---+-------------------------------------------------------
%e A344839     0|   0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
%e A344839     1|   1  0  0  1  0  1  2  3  0  1   2   3   4   5   6   7
%e A344839     2|   2  0  0  1  0  1  2  3  0  1   2   3   4   5   6   7
%e A344839     3|   3  1  1  0  2  1  0  1  4  3   2   1   0   1   2   3
%e A344839     4|   4  0  0  2  0  1  2  3  0  1   2   3   4   5   6   7
%e A344839     5|   5  1  1  1  1  0  1  2  2  1   0   1   2   3   4   5
%e A344839     6|   6  2  2  0  2  1  0  1  4  3   2   1   0   1   2   3
%e A344839     7|   7  3  3  1  3  2  1  0  6  5   4   3   2   1   0   1
%e A344839     8|   8  0  0  4  0  2  4  6  0  1   2   3   4   5   6   7
%e A344839     9|   9  1  1  3  1  1  3  5  1  0   1   2   3   4   5   6
%e A344839    10|  10  2  2  2  2  0  2  4  2  1   0   1   2   3   4   5
%e A344839    11|  11  3  3  1  3  1  1  3  3  2   1   0   1   2   3   4
%e A344839    12|  12  4  4  0  4  2  0  2  4  3   2   1   0   1   2   3
%e A344839    13|  13  5  5  1  5  3  1  1  5  4   3   2   1   0   1   2
%e A344839    14|  14  6  6  2  6  4  2  0  6  5   4   3   2   1   0   1
%e A344839    15|  15  7  7  3  7  5  3  1  7  6   5   4   3   2   1   0
%o A344839 (PARI) T(n,k,op=(x,y)->abs(x-y),w=m->#binary(m)) = { op(n*2^max(0, w(k)-w(n)), k*2^max(0, w(n)-w(k))) }
%Y A344839 Cf. A049581, A053645, A070939.
%Y A344839 Cf. A344834 (AND), A344835 (OR), A344836 (XOR), A344837 (min), A344838 (max).
%K A344839 nonn,base,tabl
%O A344839 0,4
%A A344839 _Rémy Sigrist_, May 29 2021