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.

A341839 Square array T(n, k), n, k >= 0, read by antidiagonals; for any number m with runs in binary expansion (r_1, ..., r_j), let R(m) = {r_1 + ... + r_j, r_2 + ... + r_j, ..., r_j}; T(n, k) is the unique number t such that R(t) is the union of R(n) and of R(k).

This page as a plain text file.
%I A341839 #17 Feb 24 2021 08:20:29
%S A341839 0,1,1,2,1,2,3,2,2,3,4,2,2,2,4,5,5,2,2,5,5,6,5,5,3,5,5,6,7,6,5,4,4,5,
%T A341839 6,7,8,6,5,5,4,5,5,6,8,9,9,5,5,5,5,5,5,9,9,10,9,10,4,5,5,5,4,10,9,10,
%U A341839 11,10,10,11,4,5,5,4,11,10,10,11,12,10,10,10,11,5,6,5,11,10,10,10,12
%N A341839 Square array T(n, k), n, k >= 0, read by antidiagonals; for any number m with runs in binary expansion (r_1, ..., r_j), let R(m) = {r_1 + ... + r_j, r_2 + ... + r_j, ..., r_j}; T(n, k) is the unique number t such that R(t) is the union of R(n) and of R(k).
%C A341839 For any m > 0, R(m) contains the partial sums of the m-th row of A227736; by convention, R(0) = {}.
%C A341839 The underlying idea is to break in an optimal way the runs in binary expansions of n and of k so that they match, hence the relationship with A003188.
%H A341839 Rémy Sigrist, <a href="/A341839/b341839.txt">Table of n, a(n) for n = 0..10010</a>
%H A341839 Rémy Sigrist, <a href="/A341839/a341839.png">Colored representation of the table for n, k < 2^10</a>
%H A341839 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A341839 T(n, k) = T(k, n)
%F A341839 T(m, T(n, k)) = T(T(m, n), k).
%F A341839 T(n, n) = n.
%F A341839 T(n, 0) = 0.
%F A341839 A070939(T(n, k)) = max(A070939(n), A070939(k)).
%F A341839 A003188(T(n, k)) = A003188(n) OR A003188(k) (where OR denotes the bitwise OR operator).
%F A341839 T(n, 1) = A042963(ceiling((n+1)/2)).
%e A341839 Array T(n, k) begins:
%e A341839   n\k|    0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A341839   ---+-----------------------------------------------------------------
%e A341839     0|    0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
%e A341839     1|    1   1   2   2   5   5   6   6   9   9  10  10  13  13  14  14
%e A341839     2|    2   2   2   2   5   5   5   5  10  10  10  10  13  13  13  13
%e A341839     3|    3   2   2   3   4   5   5   4  11  10  10  11  12  13  13  12
%e A341839     4|    4   5   5   4   4   5   5   4  11  10  10  11  11  10  10  11
%e A341839     5|    5   5   5   5   5   5   5   5  10  10  10  10  10  10  10  10
%e A341839     6|    6   6   5   5   5   5   6   6   9   9  10  10  10  10   9   9
%e A341839     7|    7   6   5   4   4   5   6   7   8   9  10  11  11  10   9   8
%e A341839     8|    8   9  10  11  11  10   9   8   8   9  10  11  11  10   9   8
%e A341839     9|    9   9  10  10  10  10   9   9   9   9  10  10  10  10   9   9
%e A341839    10|   10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
%e A341839    11|   11  10  10  11  11  10  10  11  11  10  10  11  11  10  10  11
%e A341839    12|   12  13  13  12  11  10  10  11  11  10  10  11  12  13  13  12
%e A341839    13|   13  13  13  13  10  10  10  10  10  10  10  10  13  13  13  13
%e A341839    14|   14  14  13  13  10  10   9   9   9   9  10  10  13  13  14  14
%e A341839    15|   15  14  13  12  11  10   9   8   8   9  10  11  12  13  14  15
%o A341839 (PARI) T(n,k) = { my (r=[], v=0); while (n||k, my (w=min(valuation(n+n%2,2), valuation(k+k%2,2))); r=concat(w,r); n\=2^w; k\=2^w); for (k=1, #r, v=(v+k%2)*2^r[k]-k%2); v }
%Y A341839 Cf. A003188, A003987, A005811, A042963, A070939, A101211, A227736, A341840, A341841.
%K A341839 nonn,base,tabl
%O A341839 0,4
%A A341839 _Rémy Sigrist_, Feb 21 2021