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.

A343040 Array T(n, k), n, k >= 0, read by antidiagonals; lunar addition table for the factorial base.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 3, 3, 3, 3, 4, 3, 2, 3, 4, 5, 5, 3, 3, 5, 5, 6, 5, 4, 3, 4, 5, 6, 7, 7, 5, 5, 5, 5, 7, 7, 8, 7, 8, 5, 4, 5, 8, 7, 8, 9, 9, 9, 9, 5, 5, 9, 9, 9, 9, 10, 9, 8, 9, 10, 5, 10, 9, 8, 9, 10, 11, 11, 9, 9, 11, 11, 11, 11, 9, 9, 11, 11, 12, 11, 10, 9, 10, 11, 6, 11, 10, 9, 10, 11, 12
Offset: 0

Views

Author

Rémy Sigrist, Apr 03 2021

Keywords

Comments

The i-th digit of T(n, k) in factorial base is the largest of the i-th digits of n and of k in factorial base.
For n = 0..23, the factorial and primorial base representations of n are the same; hence the date sections for this sequence and for A343044 are the same.

Examples

			Array T(n, k) begins:
  n\k|   0   1   2   3   4   5   6   7   8   9  10  11  12
  ---+----------------------------------------------------
    0|   0   1   2   3   4   5   6   7   8   9  10  11  12
    1|   1   1   3   3   5   5   7   7   9   9  11  11  13
    2|   2   3   2   3   4   5   8   9   8   9  10  11  14
    3|   3   3   3   3   5   5   9   9   9   9  11  11  15
    4|   4   5   4   5   4   5  10  11  10  11  10  11  16
    5|   5   5   5   5   5   5  11  11  11  11  11  11  17
    6|   6   7   8   9  10  11   6   7   8   9  10  11  12
    7|   7   7   9   9  11  11   7   7   9   9  11  11  13
    8|   8   9   8   9  10  11   8   9   8   9  10  11  14
    9|   9   9   9   9  11  11   9   9   9   9  11  11  15
   10|  10  11  10  11  10  11  10  11  10  11  10  11  16
   11|  11  11  11  11  11  11  11  11  11  11  11  11  17
   12|  12  13  14  15  16  17  12  13  14  15  16  17  12
Array T(n, k) begins in factorial base:
  n\k|    0    1   10   11   20   21  100  101  110  111  120  121  200
  ---+-----------------------------------------------------------------
    0|    0    1   10   11   20   21  100  101  110  111  120  121  200
    1|    1    1   11   11   21   21  101  101  111  111  121  121  201
   10|   10   11   10   11   20   21  110  111  110  111  120  121  210
   11|   11   11   11   11   21   21  111  111  111  111  121  121  211
   20|   20   21   20   21   20   21  120  121  120  121  120  121  220
   21|   21   21   21   21   21   21  121  121  121  121  121  121  221
  100|  100  101  110  111  120  121  100  101  110  111  120  121  200
  101|  101  101  111  111  121  121  101  101  111  111  121  121  201
  110|  110  111  110  111  120  121  110  111  110  111  120  121  210
  111|  111  111  111  111  121  121  111  111  111  111  121  121  211
  120|  120  121  120  121  120  121  120  121  120  121  120  121  220
  121|  121  121  121  121  121  121  121  121  121  121  121  121  221
  200|  200  201  210  211  220  221  200  201  210  211  220  221  200
		

Crossrefs

Programs

  • PARI
    T(n,k) = { my (v=0, f=1); for (r=2, oo, if (n==0 && k==0, return (v), v+=max(n%r, k%r)*f; f*=r; n\=r; k\=r)) }

Formula

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