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.

A343230 A binary encoding of the digits "0" in balanced ternary representation of n.

This page as a plain text file.
%I A343230 #15 Apr 09 2021 11:54:51
%S A343230 0,0,0,1,0,0,1,0,2,3,2,0,1,0,0,1,0,2,3,2,0,1,0,4,5,4,6,7,6,4,5,4,0,1,
%T A343230 0,2,3,2,0,1,0,0,1,0,2,3,2,0,1,0,4,5,4,6,7,6,4,5,4,0,1,0,2,3,2,0,1,0,
%U A343230 8,9,8,10,11,10,8,9,8,12,13,12,14,15,14,12
%N A343230 A binary encoding of the digits "0" in balanced ternary representation of n.
%C A343230 The ones in the binary representation of a(n) correspond to the nonleading digits "0" in the balanced ternary representation of n.
%C A343230 We can extend this sequence to negative indices: a(-n) = a(n) for any n >= 0.
%H A343230 Rémy Sigrist, <a href="/A343230/b343230.txt">Table of n, a(n) for n = 0..6561</a>
%H A343230 Wikipedia, <a href="https://en.wikipedia.org/wiki/Balanced_ternary">Balanced ternary</a>
%e A343230 The first terms, alongside the balanced ternary representation of n (with "T" instead of digits "-1") and the binary representation of a(n), are:
%e A343230   n   a(n)  ter(n)  bin(a(n))
%e A343230   --  ----  ------  ---------
%e A343230    0     0       0          0
%e A343230    1     0       1          0
%e A343230    2     0      1T          0
%e A343230    3     1      10          1
%e A343230    4     0      11          0
%e A343230    5     0     1TT          0
%e A343230    6     1     1T0          1
%e A343230    7     0     1T1          0
%e A343230    8     2     10T         10
%e A343230    9     3     100         11
%e A343230   10     2     101         10
%e A343230   11     0     11T          0
%e A343230   12     1     110          1
%e A343230   13     0     111          0
%e A343230   14     0    1TTT          0
%e A343230   15     1    1TT0          1
%o A343230 (PARI) a(n) = { my (v=0, b=1, t); while (n, t=centerlift(Mod(n, 3)); if (t==0, v+=b); n=(n-t)\3; b*=2); v }
%Y A343230 Cf. A059095, A140267, A291770, A343228, A343229, A343231, A147991 (indices of 0's).
%K A343230 nonn,look,base
%O A343230 0,9
%A A343230 _Rémy Sigrist_, Apr 08 2021