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.

A341840 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 intersection of R(n) and of R(k).

This page as a plain text file.
%I A341840 #18 Apr 24 2022 06:35:07
%S A341840 0,0,0,0,1,0,0,1,1,0,0,0,2,0,0,0,0,3,3,0,0,0,1,3,3,3,1,0,0,1,2,3,3,2,
%T A341840 1,0,0,0,1,3,4,3,1,0,0,0,0,0,0,4,4,0,0,0,0,0,1,0,0,7,5,7,0,0,1,0,0,1,
%U A341840 1,0,7,6,6,7,0,1,1,0,0,0,2,0,7,7,6,7,7,0,2,0,0
%N A341840 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 intersection of R(n) and of R(k).
%C A341840 For any m > 0, R(m) contains the partial sums of the m-th row of A227736; by convention, R(0) = {}.
%C A341840 The underlying idea is to merge in an optimal way the runs in binary expansions of n and of k so that they match, hence the relationship with A003188.
%H A341840 Rémy Sigrist, <a href="/A341840/b341840.txt">Table of n, a(n) for n = 0..10010</a>
%H A341840 Rémy Sigrist, <a href="/A341840/a341840.png">Colored representation of the table for n, k < 2^10</a>
%H A341840 Rémy Sigrist, <a href="/A341840/a341840_1.png">Colored representation of the table for n, k < 2^10</a> (black pixels correspond to 0's)
%H A341840 Rémy Sigrist, <a href="/A341840/a341840.gp.txt">PARI program for A341840</a>
%H A341840 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A341840 T(n, k) = T(k, n).
%F A341840 T(m, T(n, k)) = T(T(m, n), k).
%F A341840 T(n, n) = n.
%F A341840 T(n, 0) = 0.
%F A341840 A070939(T(n, k)) <= min(A070939(n), A070939(k)).
%F A341840 A003188(T(n, k)) = A003188(n) AND A003188(k) (where AND denotes the bitwise AND operator).
%e A341840 Array T(n, k) begins:
%e A341840   n\k|  0  1  2  3  4  5  6  7   8   9  10  11  12  13  14  15
%e A341840   ---+--------------------------------------------------------
%e A341840     0|  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0   0
%e A341840     1|  0  1  1  0  0  1  1  0   0   1   1   0   0   1   1   0
%e A341840     2|  0  1  2  3  3  2  1  0   0   1   2   3   3   2   1   0
%e A341840     3|  0  0  3  3  3  3  0  0   0   0   3   3   3   3   0   0
%e A341840     4|  0  0  3  3  4  4  7  7   7   7   4   4   3   3   0   0
%e A341840     5|  0  1  2  3  4  5  6  7   7   6   5   4   3   2   1   0
%e A341840     6|  0  1  1  0  7  6  6  7   7   6   6   7   0   1   1   0
%e A341840     7|  0  0  0  0  7  7  7  7   7   7   7   7   0   0   0   0
%e A341840     8|  0  0  0  0  7  7  7  7   8   8   8   8  15  15  15  15
%e A341840     9|  0  1  1  0  7  6  6  7   8   9   9   8  15  14  14  15
%e A341840    10|  0  1  2  3  4  5  6  7   8   9  10  11  12  13  14  15
%e A341840    11|  0  0  3  3  4  4  7  7   8   8  11  11  12  12  15  15
%e A341840    12|  0  0  3  3  3  3  0  0  15  15  12  12  12  12  15  15
%e A341840    13|  0  1  2  3  3  2  1  0  15  14  13  12  12  13  14  15
%e A341840    14|  0  1  1  0  0  1  1  0  15  14  14  15  15  14  14  15
%e A341840    15|  0  0  0  0  0  0  0  0  15  15  15  15  15  15  15  15
%o A341840 (PARI) See Links section.
%Y A341840 Cf. A003188, A003987, A005811, A070939, A227736, A341839, A341840, A341841.
%K A341840 nonn,tabl,base
%O A341840 0,13
%A A341840 _Rémy Sigrist_, Feb 21 2021