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.

Showing 1-3 of 3 results.

A368240 Inverse permutation to A368239.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 7, 8, 10, 11, 12, 13, 14, 15, 22, 16, 17, 23, 26, 27, 30, 18, 19, 24, 20, 21, 25, 28, 29, 31, 32, 33, 36, 34, 35, 37, 38, 39, 40, 41, 42, 57, 43, 44, 58, 65, 66, 73, 45, 46, 59, 47, 48, 60, 67, 68, 74, 77, 78, 85, 79, 80, 86, 89, 90, 93
Offset: 0

Views

Author

Rémy Sigrist, Dec 18 2023

Keywords

Examples

			A368239(67) = 56, so a(56) = 67.
		

Crossrefs

Cf. A368239.

Programs

  • PARI
    See Links section.

A368225 Irregular table of nonnegative integers read by rows: the 1's in the binary expansion of n exactly match the nonzero digits in the balanced ternary expansions of the terms in the n-th row.

Original entry on oeis.org

0, 1, 3, 2, 4, 9, 8, 10, 6, 12, 5, 7, 11, 13, 27, 26, 28, 24, 30, 23, 25, 29, 31, 18, 36, 17, 19, 35, 37, 15, 21, 33, 39, 14, 16, 20, 22, 32, 34, 38, 40, 81, 80, 82, 78, 84, 77, 79, 83, 85, 72, 90, 71, 73, 89, 91, 69, 75, 87, 93, 68, 70, 74, 76, 86, 88, 92, 94
Offset: 0

Views

Author

Rémy Sigrist, Dec 18 2023

Keywords

Comments

As a flat sequence, this is a permutation of the nonnegative integers with inverse A368226 and infinitely many fixed points (see Formula section).
Row 0 has one term, and for n > 0, row n has A048896(n-1) terms.
For any n >= 0, row n ends with A005836(n+1).

Examples

			Table T(n, k) begins:
    0;
    1;
    3;
    2, 4;
    9;
    8, 10;
    6, 12;
    5, 7, 11, 13;
    27;
    26, 28;
    24, 30;
    23, 25, 29, 31;
    18, 36;
    17, 19, 35, 37;
    15, 21, 33, 39;
    14, 16, 20, 22, 32, 34, 38, 40;
    81;
    ...
		

Crossrefs

See A368229 and A368239 for similar sequences.

Programs

  • PARI
    row(n) = { my (r = [sign(n)], b = binary(n)); for (k = 2, #b, r = [3*v+b[k]|v<-r]; if (b[k], r = concat(r, [v-2|v<-r]););); Set(r); }

Formula

A343231(T(n, k)) = n.
a(m) = m for any m in A003462.

A380180 Irregular table T(n, k), n >= 0, k = 1..2^A005812(n); the n-th row lists the integers m (possibly negative) such that the nonzero digits in the balanced ternary expansion of m appear in the balanced ternary expansion of n.

Original entry on oeis.org

0, 0, 1, -1, 0, 2, 3, 0, 3, 0, 1, 3, 4, -4, -3, -1, 0, 5, 6, 8, 9, -3, 0, 6, 9, -3, -2, 0, 1, 6, 7, 9, 10, -1, 0, 8, 9, 0, 9, 0, 1, 9, 10, -1, 0, 2, 3, 8, 9, 11, 12, 0, 3, 9, 12, 0, 1, 3, 4, 9, 10, 12, 13, -13, -12, -10, -9, -4, -3, -1, 0, 14, 15, 17, 18, 23, 24, 26, 27
Offset: 0

Views

Author

Rémy Sigrist, Jan 15 2025

Keywords

Comments

Every integer appears infinitely many times in the sequence.
See A368239 (resp. A380181) for the nonnegative values (resp. the nonpositive values, negated) in order of appearance in the present sequence.

Examples

			Irregular table T(n, k) begins:
  n   n-th row
  --  -------------------------
   0  0
   1  0, 1
   2  -1, 0, 2, 3
   3  0, 3
   4  0, 1, 3, 4
   5  -4, -3, -1, 0, 5, 6, 8, 9
   6  -3, 0, 6, 9
   7  -3, -2, 0, 1, 6, 7, 9, 10
   8  -1, 0, 8, 9
   9  0, 9
  10  0, 1, 9, 10
  11  -1, 0, 2, 3, 8, 9, 11, 12
  12  0, 3, 9, 12
.
Irregular table T(n, k) begins in balanced ternary:
  n    n-th row
  ---  --------------------------------
    0  0
    1  0, 1
   1T  T, 0, 1T, 10
   10  0, 10
   11  0, 1, 10, 11
  1TT  TT, T0, T, 0, 1TT, 1T0, 10T, 100
  1T0  T0, 0, 1T0, 100
  1T1  T0, T1, 0, 1, 1T0, 1T1, 100, 101
  10T  T, 0, 10T, 100
  100  0, 100
  101  0, 1, 100, 101
  11T  T, 0, 1T, 10, 10T, 100, 11T, 110
  110  0, 10, 100, 110
		

Crossrefs

See A380123 for a similar sequence.

Programs

  • PARI
    row(n) = { my (r = [0], d, t = 1); while (n, d = centerlift(Mod(n, 3)); if (d, r = concat(r, [v + d*t | v <- r]);); n = (n-d)/3; t *= 3;); vecsort(r); }

Formula

T(n, 1) = - A060373(n).
T(n, 2^A005812(n)) = A060372(n).
Showing 1-3 of 3 results.