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.

A371265 Irregular triangle T(n, k), n >= 0, read by rows; the n-th row lists the numbers m such that A371263(m) = n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 6, 7, 8, 10, 11, 12, 13, 14, 27, 15, 16, 26, 28, 17, 19, 20, 21, 24, 25, 29, 30, 18, 22, 23, 31, 32, 36, 33, 34, 35, 37, 38, 39, 40, 41, 81, 42, 43, 80, 82, 44, 46, 47, 48, 78, 79, 83, 84, 45, 49, 77, 85, 50, 58, 59, 63, 72, 76, 86, 90
Offset: 0

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Comments

Row 0 has 1 term; for n > 0, row n has A225081(n-1) terms.
As a flat sequence, this is a permutation of the nonnegative integers, with inverse A371266.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ------------------------------
   0  0
   1  1
   2  2, 3
   3  4
   4  5, 9
   5  6, 7, 8, 10
   6  11, 12
   7  13
   8  14, 27
   9  15, 16, 26, 28
  10  17, 19, 20, 21, 24, 25, 29, 30
  11  18, 22, 23, 31
  12  32, 36
  13  33, 34, 35, 37
  14  38, 39
  15  40
.
Triangle T(n, k) begins, in balanced ternary, with row indexes in binary:
  bin(n)  n-th row in balanced ternary
  ------  ----------------------------------------------
       0  0
       1  1
      10  1T, 10
      11  11
     100  1TT, 100
     101  1T0, 1T1, 10T, 101
     110  11T, 110
     111  111
    1000  1TTT, 1000
    1001  1TT0, 1TT1, 100T, 1001
    1010  1T0T, 1T01, 1T1T, 1T10, 10T0, 10T1, 101T, 1010
    1011  1T00, 1T11, 10TT, 1011
    1100  11TT, 1100
    1101  11T0, 11T1, 110T, 1101
    1110  111T, 1110
    1111  1111
		

Crossrefs

See A371257 for a similar sequence.
Cf. A225081, A371266 (inverse).

Programs

  • PARI
    \\ See Links section.

A371256 The run lengths transform of the ternary expansion of n corresponds to the run lengths transform of the binary expansion of a(n).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Comments

For any v >= 0, the value v appears 2^A005811(v) times in the sequence.

Examples

			The first terms, alongside the ternary expansion of n and the binary expansion of a(n), are:
  n   a(n)  ter(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     1       2          1
   3     2      10         10
   4     3      11         11
   5     2      12         10
   6     2      20         10
   7     2      21         10
   8     3      22         11
   9     4     100        100
  10     5     101        101
  11     5     102        101
  12     6     110        110
  13     7     111        111
  14     6     112        110
  15     5     120        101
		

Crossrefs

See A371263 for a similar sequence.

Programs

  • PARI
    a(n) = { my (r = [], d, l, v = 0); while (n, d = n%3; l = 0; while ((n%3)==d, n\=3; l++;); r = concat(l, r);); for (k = 1, #r, v = (v+k%2)*2^r[k]-k%2); v }

Formula

a(A005823(n)) = n - 1.
a(A005836(n)) = n - 1.
a(A004488(n)) = a(n).
abs(a(n+1) - a(n)) <= 1.

A371267 Lexicographically latest sequence of distinct nonnegative integers such that the run lengths transforms of the balanced ternary expansions of n and of a(n) are the same.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			The first terms, in decimal and in balanced ternary, are:
  n   a(n)  bter(n)  bter(a(n))
  --  ----  -------  ----------
   0     0        0           0
   1     1        1           1
   2     3       1T          10
   3     2       10          1T
   4     4       11          11
   5     9      1TT         100
   6    10      1T0         101
   7     8      1T1         10T
   8     7      10T         1T1
   9     5      100         1TT
  10     6      101         1T0
  11    12      11T         110
  12    11      110         11T
  13    13      111         111
  14    27     1TTT        1000
  15    28     1TT0        1001
		

Crossrefs

See A371261 for a similar sequence.
Cf. A003462 (fixed points), A371263.

Programs

  • PARI
    \\ See Links section.

Formula

A371263(a(n)) = A371263(n).
a(n) = n iff n belongs to A003462.
Showing 1-3 of 3 results.