The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A328749 a(n) = Sum_{k = 0..w and t_k > 0} (-1)^t_k * 2^k, where Sum_{k = 0..w} t_k * 3^k is the ternary representation of n. 2
 0, -1, 1, -2, -3, -1, 2, 1, 3, -4, -5, -3, -6, -7, -5, -2, -3, -1, 4, 3, 5, 2, 1, 3, 6, 5, 7, -8, -9, -7, -10, -11, -9, -6, -7, -5, -12, -13, -11, -14, -15, -13, -10, -11, -9, -4, -5, -3, -6, -7, -5, -2, -3, -1, 8, 7, 9, 6, 5, 7, 10, 9, 11, 4, 3, 5, 2, 1, 3, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS Every integer appears in the sequence. LINKS Rémy Sigrist, Table of n, a(n) for n = 0..6561 FORMULA a(n) = 0 iff n = 0. a(n) > 0 iff n belongs to A157671. a(n) < 0 iff n belongs to A132141. a(A004488(n)) = -a(n). EXAMPLE a(42) = a(1*3^3 + 1*3^2 + 2*3^1) = -2^3 - 2^2 + 2^1 = -10. PROG (PARI) a(n) = my (d=Vecrev(digits(n, 3))); sum(i=1, #d, if (d[i], (2^i) * (-1)^d[i], 0))/2 CROSSREFS Cf. A004488, A132141, A157671, A328728. Sequence in context: A005680 A036582 A260451 * A036848 A289585 A128864 Adjacent sequences:  A328746 A328747 A328748 * A328750 A328751 A328752 KEYWORD sign,base AUTHOR Rémy Sigrist, Oct 27 2019 STATUS approved

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

Last modified August 9 13:57 EDT 2020. Contains 336323 sequences. (Running on oeis4.)