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.

A065369 Replace 3^k with (-3)^k in ternary expansion of n.

This page as a plain text file.
%I A065369 #25 Jan 15 2024 08:55:08
%S A065369 0,1,2,-3,-2,-1,-6,-5,-4,9,10,11,6,7,8,3,4,5,18,19,20,15,16,17,12,13,
%T A065369 14,-27,-26,-25,-30,-29,-28,-33,-32,-31,-18,-17,-16,-21,-20,-19,-24,
%U A065369 -23,-22,-9,-8,-7,-12,-11,-10,-15,-14,-13,-54,-53,-52,-57,-56,-55,-60,-59,-58,-45,-44,-43,-48,-47,-46
%N A065369 Replace 3^k with (-3)^k in ternary expansion of n.
%C A065369 Base 3 representation for n (in lexicographic order) converted from base -3 to base 10.
%C A065369 Notation: (3)[n](-3)
%C A065369 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
%H A065369 Rémy Sigrist, <a href="/A065369/b065369.txt">Table of n, a(n) for n = 0..19682</a>
%H A065369 Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, <a href="https://arxiv.org/abs/2012.04625">Finding structure in sequences of real numbers via graph theory: a problem list</a>, arXiv:2012.04625 [math.CO], 2020-2021.
%F A065369 a(n) = Sum_{k>=0} A030341(n,k)*(-3)^k. - _Philippe Deléham_, Oct 22 2011
%F A065369 a(3*k+m) = -3*a(k)+m for 0 <= m < 3. - _Chai Wah Wu_, Jan 16 2020
%e A065369 15 = +1(9)+2(3)+0(1) -> +1(+9)+2(-3)+0(+1) = +3 = a(15)
%t A065369 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
%o A065369 (PARI) a(n) = fromdigits(digits(n, 3), -3) \\ _Rémy Sigrist_, Feb 06 2020
%Y A065369 Cf. A007089, A053985, A065367, A073785, A073791, A073792, A073793, A073794, A073795, A073796, A073835.
%K A065369 base,easy,look,sign
%O A065369 0,3
%A A065369 _Marc LeBrun_, Oct 31 2001