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.

A371266 Inverse permutation to A371265.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 6, 10, 11, 12, 13, 14, 16, 17, 20, 28, 21, 22, 23, 29, 30, 24, 25, 18, 15, 19, 26, 27, 31, 32, 34, 35, 36, 33, 37, 38, 39, 40, 41, 43, 44, 47, 55, 48, 49, 50, 56, 59, 67, 68, 83, 91, 84, 69, 70, 60, 61, 71, 72, 73, 62, 74, 85, 86, 92
Offset: 0

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Examples

			A371265(42) = 81, so a(81) = 42.
		

Crossrefs

Cf. A371265.

Programs

  • PARI
    \\ See Links section.

A371257 Irregular triangle T(n, k), n >= 0, k = 1..2^A005811(n), read by rows; the n-th row lists the numbers m such that A371256(m) = n.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 4, 8, 9, 17, 18, 22, 10, 11, 15, 16, 19, 20, 21, 23, 12, 14, 24, 25, 13, 26, 27, 53, 54, 67, 28, 29, 51, 52, 55, 56, 66, 68, 30, 32, 33, 34, 46, 47, 48, 50, 57, 59, 60, 61, 64, 65, 69, 70, 31, 35, 45, 49, 58, 62, 63, 71, 36, 44, 72, 76
Offset: 0

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Comments

The n-th row has 2^A005811(n) terms.
As a flat sequence, this is a permutation of the nonnegative integers, with inverse A371258.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  --------------------------------------------------------------
   0  0
   1  1, 2
   2  3, 5, 6, 7
   3  4, 8
   4  9, 17, 18, 22
   5  10, 11, 15, 16, 19, 20, 21, 23
   6  12, 14, 24, 25
   7  13, 26
   8  27, 53, 54, 67
   9  28, 29, 51, 52, 55, 56, 66, 68
  10  30, 32, 33, 34, 46, 47, 48, 50, 57, 59, 60, 61, 64, 65, 69, 70
  11  31, 35, 45, 49, 58, 62, 63, 71
  12  36, 44, 72, 76
  13  37, 38, 42, 43, 73, 74, 75, 77
  14  39, 41, 78, 79
  15  40, 80
.
Triangle T(n, k) begins, in ternary, with row indexes in binary:
  bin(n)  n-th row in ternary
  ------  ----------------------------------------------
       0  0
       1  1, 2
      10  10, 12, 20, 21
      11  11, 22
     100  100, 122, 200, 211
     101  101, 102, 120, 121, 201, 202, 210, 212
     110  110, 112, 220, 221
     111  111, 222
    1000  1000, 1222, 2000, 2111
    1001  1001, 1002, 1220, 1221, 2001, 2002, 2110, 2112
		

Crossrefs

See A371265 for a similar sequence.

Programs

  • PARI
    \\ See Links section.

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

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 16 2024

Keywords

Comments

For any v > 0, the value v appears A225081(v-1) times in the sequence.

Examples

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

Crossrefs

See A371256 for a similar sequence.

Programs

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

Formula

abs(a(n+1) - a(n)) <= 1.
Showing 1-3 of 3 results.