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.

A338245 Nonnegative values in A117966, in order of appearance.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Oct 18 2020

Keywords

Comments

This sequence is a permutation of the nonnegative integers with inverse A338247 (the offset has been set to 0 so as to get a permutation).
There are only two fixed points: a(0) = 0 and a(1) = 1.

Examples

			A117966 = 0, 1, -1, 3, 4, 2, -3, -2, -4, 9, 10, 8, 12, 13, 11, 6, 7, 5, ...
We keep:  0, 1,     3, 4, 2,             9, 10, 8, 12, 13, 11, 6, 7, 5, ...
		

Crossrefs

See A338248 for a similar sequence.

Programs

  • PARI
    A117966(n) = subst(Pol(apply(x->if(x == 2, -1, x), digits(n, 3)), 'x), 'x, 3)
    print (select(v -> v>=0, apply(A117966, [0..107])))

Formula

a(0) = 0.
a(n) = A117966(A132141(n)) for any n > 0.

A371268 If the ternary expansion of n starts with a 1, replace 1's by 2's, 2's by 0's, 0's by 1's, if it starts with a 2, replace 2's by 1's, 1's by 0's, 0's by 2's.

Original entry on oeis.org

0, 2, 1, 7, 8, 6, 5, 3, 4, 22, 23, 21, 25, 26, 24, 19, 20, 18, 17, 15, 16, 11, 9, 10, 14, 12, 13, 67, 68, 66, 70, 71, 69, 64, 65, 63, 76, 77, 75, 79, 80, 78, 73, 74, 72, 58, 59, 57, 61, 62, 60, 55, 56, 54, 53, 51, 52, 47, 45, 46, 50, 48, 49, 35, 33, 34, 29, 27
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 base 3, are:
  n   a(n)  ter(n)  ter(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     2       1          2
   2     1       2          1
   3     7      10         21
   4     8      11         22
   5     6      12         20
   6     5      20         12
   7     3      21         10
   8     4      22         11
   9    22     100        211
  10    23     101        212
  11    21     102        210
  12    25     110        221
  13    26     111        222
  14    24     112        220
  15    19     120        201
		

Crossrefs

See A004488 and A361945 for similar sequences.

Programs

  • PARI
    a(n) = { my (d = digits(n, 3)); if (#d, d = if (d[1]==1, apply(v -> [1, 2, 0][1+v], d), apply(v -> [2, 0, 1][1+v], d));); fromdigits(d, 3); }

Formula

A371256(a(n)) = A371256(n).

A371636 For any number k >= 0, let T_k be the triangle with values in {-1, 0, +1} whose base corresponds to the balanced ternary expansion of k (without leading zeros) and other values, say t above u and v, satisfy t+u+v = 0 mod 3; this sequence lists the numbers k such that T_k has 3-fold rotational symmetry.

Original entry on oeis.org

0, 1, 4, 13, 19, 25, 40, 103, 112, 121, 154, 214, 364, 442, 505, 595, 673, 763, 826, 913, 1003, 1093, 1144, 1369, 1621, 1915, 2167, 2392, 2776, 3028, 3280, 3628, 4420, 4996, 5668, 6244, 7036, 8203, 9022, 9841, 10459, 10594, 11782, 12304, 13411, 13627, 14419
Offset: 1

Views

Author

Rémy Sigrist, Mar 30 2024

Keywords

Comments

This sequence is a variant of A334556 and A361818.
This sequence is infinite as it contains A003462.
Empirically, for any w > 0, there are A127975(w-1) terms with w balanced ternary digits (ignoring leading zeros).
If k is a term then A338246(k) is also a term.

Examples

			The balanced ternary expansion of 595 is "1T11001" (where T denotes -1), and the corresponding triangle T_595 is as follows:
           1
          T 0
         1 0 0
        1 1 T 1
       0 T 0 1 1
      0 0 1 T 0 T
     1 T 1 1 0 0 1
As this triangle has 3-fold rotational symmetry, 595 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
Showing 1-3 of 3 results.