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.

A380123 Irregular table T(n, k), n >= 0, k = 1..A380122(n), read by rows; the n-th row lists the integers m (possibly negative) such that the nonzero digits in the nonadjacent form for m appear in the nonadjacent form for n.

Original entry on oeis.org

0, 0, 1, 0, 2, -1, 0, 3, 4, 0, 4, 0, 1, 4, 5, -2, 0, 6, 8, -1, 0, 7, 8, 0, 8, 0, 1, 8, 9, 0, 2, 8, 10, -5, -4, -1, 0, 11, 12, 15, 16, -4, 0, 12, 16, -4, -3, 0, 1, 12, 13, 16, 17, -2, 0, 14, 16, -1, 0, 15, 16, 0, 16, 0, 1, 16, 17, 0, 2, 16, 18, -1, 0, 3, 4, 15, 16, 19, 20
Offset: 0

Views

Author

Rémy Sigrist, Jan 12 2025

Keywords

Examples

			Irregular table T(n, k) begins:
  n   n-th row
  --  -----------------------------
   0  0
   1  0, 1
   2  0, 2
   3  -1, 0, 3, 4
   4  0, 4
   5  0, 1, 4, 5
   6  -2, 0, 6, 8
   7  -1, 0, 7, 8
   8  0, 8
   9  0, 1, 8, 9
  10  0, 2, 8, 10
  11  -5, -4, -1, 0, 11, 12, 15, 16
  12  -4, 0, 12, 16
  13  -4, -3, 0, 1, 12, 13, 16, 17
  14  -2, 0, 14, 16
  15  -1, 0, 15, 16
  16  0, 16
.
Irregular table T(n, k) begins in nonadjacent form:
  n      n-th row
  -----  ------------------------------------------
      0  0
      1  0, 1
     10  0, 10
    10T  T, 0, 10T, 100
    100  0, 100
    101  0, 1, 100, 101
   10T0  T0, 0, 10T0, 1000
   100T  T, 0, 100T, 1000
   1000  0, 1000
   1001  0, 1, 1000, 1001
   1010  0, 10, 1000, 1010
  10T0T  T0T, T00, T, 0, 10T0T, 10T00, 1000T, 10000
  10T00  T00, 0, 10T00, 10000
		

Crossrefs

See A295989 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], d, b = 1); while (n, if (n % 2, n -= d = 2 - (n%4); r = concat(r, [v + d*b | v <- r]);); n /= 2; b *= 2;); vecsort(r); }

Formula

T(n, 1) = A184616(n).
T(n, A380122(n)) = n.