OFFSET
0,3
COMMENTS
Base 3 representation for n (in lexicographic order) converted from base -3 to base 10.
Notation: (3)[n](-3)
Fixed point of the morphism 0-> 0,1,2 ; 1-> -3,-2,-1 ; 2-> -6,-5,-4 ; ...; n-> -3n,-3n+1,-3n+2. - Philippe Deléham, Oct 22 2011
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..19682
Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, Finding structure in sequences of real numbers via graph theory: a problem list, arXiv:2012.04625 [math.CO], 2020-2021.
FORMULA
a(n) = Sum_{k>=0} A030341(n,k)*(-3)^k. - Philippe Deléham, Oct 22 2011
a(3*k+m) = -3*a(k)+m for 0 <= m < 3. - Chai Wah Wu, Jan 16 2020
EXAMPLE
15 = +1(9)+2(3)+0(1) -> +1(+9)+2(-3)+0(+1) = +3 = a(15)
MATHEMATICA
f[n_Integer, b_Integer] := Block[{l = IntegerDigits[n]}, Sum[l[[ -i]]*(-b)^(i - 1), {i, 1, Length[l]}]]; a = Table[ FromDigits[ IntegerDigits[n, 3]], {n, 0, 80}]; b = {}; Do[b = Append[b, f[a[[n]], 3]], {n, 1, 80}]; b
PROG
(PARI) a(n) = fromdigits(digits(n, 3), -3) \\ Rémy Sigrist, Feb 06 2020
CROSSREFS
KEYWORD
AUTHOR
Marc LeBrun, Oct 31 2001
STATUS
approved