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.

A343766 Lexicographically earliest sequence of distinct integers such that a(0) = 0 and the balanced ternary expansions of two consecutive terms differ by a single digit, as far to the right as possible.

This page as a plain text file.
%I A343766 #19 May 02 2021 04:17:38
%S A343766 0,-1,1,-2,-4,-3,3,2,4,-5,-7,-6,-12,-13,-11,-8,-10,-9,9,8,10,7,5,6,12,
%T A343766 11,13,-14,-16,-15,-21,-22,-20,-17,-19,-18,-36,-37,-35,-38,-40,-39,
%U A343766 -33,-34,-32,-23,-25,-24,-30,-31,-29,-26,-28,-27,27,26,28,25,23,24
%N A343766 Lexicographically earliest sequence of distinct integers such that a(0) = 0 and the balanced ternary expansions of two consecutive terms differ by a single digit, as far to the right as possible.
%C A343766 This sequence has similarities with A003188 and with A341055.
%C A343766 A007949 gives the positions of the digit that is altered from one term to the other.
%C A343766 To compute a(n):
%C A343766 - consider the ternary representation of A128173(n),
%C A343766 - replace 1's by -1's and 2's by 1's,
%C A343766 - convert back to decimal.
%H A343766 Rémy Sigrist, <a href="/A343766/b343766.txt">Table of n, a(n) for n = 0..6560</a>
%H A343766 Rémy Sigrist, <a href="/A343766/a343766.png">Scatterplot of the first 3^10 terms</a>
%H A343766 Rémy Sigrist, <a href="/A343766/a343766.gp.txt">PARi program for A343766</a>
%H A343766 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the integers</a>
%F A343766 a(n) = -A117966(A128173(n)).
%F A343766 Sum_{k=0..n-1} sign(a(k)) = -A081134(n).
%F A343766 Sum_{k=0..n} a(k) = 0 iff n belongs to A024023.
%e A343766 The first terms, alongside their balanced ternary expansion (with T's denoting -1's), are:
%e A343766   n   a(n)  bter(a(n))
%e A343766   --  ----  ----------
%e A343766    0     0           0
%e A343766    1    -1           T
%e A343766    2     1           1
%e A343766    3    -2          T1
%e A343766    4    -4          TT
%e A343766    5    -3          T0
%e A343766    6     3          10
%e A343766    7     2          1T
%e A343766    8     4          11
%e A343766    9    -5         T11
%e A343766   10    -7         T1T
%e A343766   11    -6         T10
%e A343766   12   -12         TT0
%e A343766   13   -13         TTT
%e A343766   14   -11         TT1
%o A343766 (PARI) See Links section.
%Y A343766 Cf. A003188, A007949, A024023, A081134, A128173, A341055.
%K A343766 sign,base
%O A343766 0,4
%A A343766 _Rémy Sigrist_, Apr 28 2021