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.

A374448 Irregular table T(n, k), n >= 0, 0 <= k < A089898(n), read by rows; the n-th row lists the numbers m in the range 0..n such that m and n-m can be added without carries in base 10.

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, 0, 1, 10, 11, 0, 1, 2, 10, 11, 12, 0, 1, 2, 3, 10, 11, 12, 13, 0, 1, 2, 3, 4, 10, 11, 12, 13, 14
Offset: 0

Views

Author

Rémy Sigrist, Jul 08 2024

Keywords

Comments

The n-th row lists the numbers m such that for any k > 0, the k-th rightmost digit of m is <= the k-th rightmost digit of n.

Examples

			Table T(n, k) begins:
  n   n-th row
  --  ---------------------------------
   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, 1, 2, 3, 4, 5, 6, 7, 8, 9
  10  0, 10
  11  0, 1, 10, 11
  12  0, 1, 2, 10, 11, 12
  13  0, 1, 2, 3, 10, 11, 12, 13
  14  0, 1, 2, 3, 4, 10, 11, 12, 13, 14
		

Crossrefs

Cf. A002262, A089898, A295989 (base-2 analog).

Programs

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

Formula

T(n, 0) = 0.
T(n, A089898(n)-1) = n.
T(n, k) + T(n, A089898(n)-1-k) = n.
T(10*n, k) = 10*T(n, k).