A060373
q(n), negative part of n when n=p(n)-q(n) with p(n), q(n), p(n)+q(n) in A005836, integers written without 2 in base 3.
Original entry on oeis.org
0, 0, 1, 0, 0, 4, 3, 3, 1, 0, 0, 1, 0, 0, 13, 12, 12, 10, 9, 9, 10, 9, 9, 4, 3, 3, 1, 0, 0, 1, 0, 0, 4, 3, 3, 1, 0, 0, 1, 0, 0, 40, 39, 39, 37, 36, 36, 37, 36, 36, 31, 30, 30, 28, 27, 27, 28, 27, 27, 31, 30, 30, 28, 27, 27, 28, 27, 27, 13, 12, 12, 10, 9, 9, 10, 9, 9, 4, 3, 3, 1, 0, 0, 1, 0
Offset: 0
Claude Lenormand (claude.lenormand(AT)free.fr), Apr 02 2001
A343228
A binary encoding of the digits "+1" in balanced ternary representation of n.
Original entry on oeis.org
0, 1, 2, 2, 3, 4, 4, 5, 4, 4, 5, 6, 6, 7, 8, 8, 9, 8, 8, 9, 10, 10, 11, 8, 8, 9, 8, 8, 9, 10, 10, 11, 12, 12, 13, 12, 12, 13, 14, 14, 15, 16, 16, 17, 16, 16, 17, 18, 18, 19, 16, 16, 17, 16, 16, 17, 18, 18, 19, 20, 20, 21, 20, 20, 21, 22, 22, 23, 16, 16, 17, 16
Offset: 0
The first terms, alongside the balanced ternary representation of n (with "T" instead of digits "-1") and the binary representation of a(n), are:
n a(n) ter(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 4 1T0 100
7 5 1T1 101
8 4 10T 100
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 8 1TT0 1000
-
a(n) = { my (v=0, b=1, t); while (n, t=centerlift(Mod(n, 3)); if (t==+1, v+=b); n=(n-t)\3; b*=2); v }
A060374
a(n)=p+q, where n=p-q and p, q, p+q are in A005836 (integers written without 2 in base 3).
Original entry on oeis.org
0, 1, 4, 3, 4, 13, 12, 13, 10, 9, 10, 13, 12, 13, 40, 39, 40, 37, 36, 37, 40, 39, 40, 31, 30, 31, 28, 27, 28, 31, 30, 31, 40, 39, 40, 37, 36, 37, 40, 39, 40, 121, 120, 121, 118, 117, 118, 121, 120, 121, 112, 111, 112, 109, 108, 109, 112, 111, 112, 121, 120, 121, 118
Offset: 0
Claude Lenormand (claude.lenormand(AT)free.fr), Apr 02 2001
A380180
Irregular table T(n, k), n >= 0, k = 1..2^A005812(n); the n-th row lists the integers m (possibly negative) such that the nonzero digits in the balanced ternary expansion of m appear in the balanced ternary expansion of n.
Original entry on oeis.org
0, 0, 1, -1, 0, 2, 3, 0, 3, 0, 1, 3, 4, -4, -3, -1, 0, 5, 6, 8, 9, -3, 0, 6, 9, -3, -2, 0, 1, 6, 7, 9, 10, -1, 0, 8, 9, 0, 9, 0, 1, 9, 10, -1, 0, 2, 3, 8, 9, 11, 12, 0, 3, 9, 12, 0, 1, 3, 4, 9, 10, 12, 13, -13, -12, -10, -9, -4, -3, -1, 0, 14, 15, 17, 18, 23, 24, 26, 27
Offset: 0
Irregular table T(n, k) begins:
n n-th row
-- -------------------------
0 0
1 0, 1
2 -1, 0, 2, 3
3 0, 3
4 0, 1, 3, 4
5 -4, -3, -1, 0, 5, 6, 8, 9
6 -3, 0, 6, 9
7 -3, -2, 0, 1, 6, 7, 9, 10
8 -1, 0, 8, 9
9 0, 9
10 0, 1, 9, 10
11 -1, 0, 2, 3, 8, 9, 11, 12
12 0, 3, 9, 12
.
Irregular table T(n, k) begins in balanced ternary:
n n-th row
--- --------------------------------
0 0
1 0, 1
1T T, 0, 1T, 10
10 0, 10
11 0, 1, 10, 11
1TT TT, T0, T, 0, 1TT, 1T0, 10T, 100
1T0 T0, 0, 1T0, 100
1T1 T0, T1, 0, 1, 1T0, 1T1, 100, 101
10T T, 0, 10T, 100
100 0, 100
101 0, 1, 100, 101
11T T, 0, 1T, 10, 10T, 100, 11T, 110
110 0, 10, 100, 110
See
A380123 for a similar sequence.
-
row(n) = { my (r = [0], d, t = 1); while (n, d = centerlift(Mod(n, 3)); if (d, r = concat(r, [v + d*t | v <- r]);); n = (n-d)/3; t *= 3;); vecsort(r); }
A112867
Greater of two ternary (base 3) numbers (each using only 0's and 1's, the latter's positions never coinciding) such that the decimal representation of their difference is n.
Original entry on oeis.org
0, 1, 10, 10, 11, 100, 100, 101, 100, 100, 101, 110, 110, 111, 1000, 1000, 1001, 1000, 1000, 1001, 1010, 1010, 1011, 1000, 1000, 1001, 1000, 1000, 1001, 1010, 1010, 1011, 1100, 1100, 1101, 1100, 1100, 1101, 1110, 1110, 1111, 10000, 10000, 10001, 10000
Offset: 0
Showing 1-5 of 5 results.
Comments