login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
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, 11, 13, -14, -16, -15, -21, -22, -20, -17, -19, -18, -36, -37, -35, -38, -40, -39, -33, -34, -32, -23, -25, -24, -30, -31, -29, -26, -28, -27, 27, 26, 28, 25, 23, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
This sequence has similarities with A003188 and with A341055.
A007949 gives the positions of the digit that is altered from one term to the other.
To compute a(n):
- consider the ternary representation of A128173(n),
- replace 1's by -1's and 2's by 1's,
- convert back to decimal.
LINKS
FORMULA
a(n) = -A117966(A128173(n)).
Sum_{k=0..n-1} sign(a(k)) = -A081134(n).
Sum_{k=0..n} a(k) = 0 iff n belongs to A024023.
EXAMPLE
The first terms, alongside their balanced ternary expansion (with T's denoting -1's), are:
n a(n) bter(a(n))
-- ---- ----------
0 0 0
1 -1 T
2 1 1
3 -2 T1
4 -4 TT
5 -3 T0
6 3 10
7 2 1T
8 4 11
9 -5 T11
10 -7 T1T
11 -6 T10
12 -12 TT0
13 -13 TTT
14 -11 TT1
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A244646 A308182 A220080 * A299920 A352962 A137363
KEYWORD
sign,base
AUTHOR
Rémy Sigrist, Apr 28 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 13:29 EDT 2024. Contains 372387 sequences. (Running on oeis4.)