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.

A342955 Array T(n,k), n, k >= 0, read by antidiagonals; the i-th decimal digit of T(n, k) is the smallest of the i-th digits of n and of k.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 0, 2, 3, 4, 5, 5, 4, 3, 2, 0, 0, 0, 1, 0, 3, 4, 5, 6, 5, 4, 3, 0, 1, 0
Offset: 0

Views

Author

Rémy Sigrist, Apr 03 2021

Keywords

Comments

This sequence has similarities with lunar addition (A087061); here we take the smallest, there the largest digits. It is "lunar multiplication" of corresponding digits.
The bitwise AND operator (A004198) is the binary analog.

Examples

			Array T(n, k) begins:
  n\k|  0  1  2  3  4  5  6  7  8  9  10  11  12  13
  ---+----------------------------------------------
    0|  0  0  0  0  0  0  0  0  0  0   0   0   0   0
    1|  0  1  1  1  1  1  1  1  1  1   0   1   1   1
    2|  0  1  2  2  2  2  2  2  2  2   0   1   2   2
    3|  0  1  2  3  3  3  3  3  3  3   0   1   2   3
    4|  0  1  2  3  4  4  4  4  4  4   0   1   2   3
    5|  0  1  2  3  4  5  5  5  5  5   0   1   2   3
    6|  0  1  2  3  4  5  6  6  6  6   0   1   2   3
    7|  0  1  2  3  4  5  6  7  7  7   0   1   2   3
    8|  0  1  2  3  4  5  6  7  8  8   0   1   2   3
    9|  0  1  2  3  4  5  6  7  8  9   0   1   2   3
   10|  0  0  0  0  0  0  0  0  0  0  10  10  10  10
   11|  0  1  1  1  1  1  1  1  1  1  10  11  11  11
   12|  0  1  2  2  2  2  2  2  2  2  10  11  12  12
   13|  0  1  2  3  3  3  3  3  3  3  10  11  12  13
		

Crossrefs

Cf. A004197 (numerical minimum), A004198 (bitwise minimum), A087061 (digit-wise maximum).

Programs

  • PARI
    T(n,k,base=10) = if (n==0 || k==0, 0, T(n\base,k\base)*base + min(n%base, k%base))

Formula

T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, n) = n.
T(n, 0) = 0.
T(n, k) + A087061(n, k) = n + k.