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.

A298486 Square array T(n, k), n >= 0, k >= 0, read by antidiagonals upwards: T(n, k) = the (k+1)-th nonnegative number m such that n + m can be computed with carry in decimal base.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jan 20 2018

Keywords

Comments

The corresponding sequence for the binary base is A295653.

Examples

			Square array begins:
  n\k|  0   1   2   3   4   5   6   7   8   9   10  ...
  ---+-------------------------------------------------
    0|  0   1   2   3   4   5   6   7   8   9   10  ... <-- A001477
    1|  0   1   2   3   4   5   6   7   8  10   11  ...
    2|  0   1   2   3   4   5   6   7  10  11   12  ...
    3|  0   1   2   3   4   5   6  10  11  12   13  ...
    4|  0   1   2   3   4   5  10  11  12  13   14  ...
    5|  0   1   2   3   4  10  11  12  13  14   20  ...
    6|  0   1   2   3  10  11  12  13  20  21   22  ...
    7|  0   1   2  10  11  12  20  21  22  30   31  ...
    8|  0   1  10  11  20  21  30  31  40  41   50  ...
    9|  0  10  20  30  40  50  60  70  80  90  100  ... <-- A008592
   10|  0   1   2   3   4   5   6   7   8   9   10  ...
		

Crossrefs

Programs

  • PARI
    T(n,k,{base=10}) = my (v=0, p=1); while (k, my (r=base - (n%base)); v += p*(k%r); n \= base; k \= r; p *= base); v

Formula

For any n >= 0 and k >= 0:
- T(0, k) = k,
- T(9, k) = 10 * k,
- T(10^n - 1, k) = 10^n * k,
- T(n, 0) = 0,
- T(n, 1) = 10^A122840(n+1),
- T(n, k + A298372(n)) = k + 10^A004218(n+1) (i.e. each row is linear).