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.

A233572 In balanced ternary notation, if prepending same numbers of zeros, reverse digits of a(n) equals to -a(n).

This page as a plain text file.
%I A233572 #8 Jun 02 2025 08:53:12
%S A233572 0,2,6,8,18,20,24,26,32,54,56,60,72,78,80,96,104,146,162,164,168,180,
%T A233572 182,216,224,234,240,242,260,288,302,312,320,338,416,438,486,488,492,
%U A233572 504,540,546,560,648,656,672,702,720,726,728,780,800,864,896,906,936
%N A233572 In balanced ternary notation, if prepending same numbers of zeros, reverse digits of a(n) equals to -a(n).
%C A233572 A233571 is a subset of this sequence.
%H A233572 Lei Zhou, <a href="/A233572/b233572.txt">Table of n, a(n) for n = 1..10000</a>
%e A233572 In balanced ternary notation, 18 = (1T00)_bt, where we use T to represent -1.  Patching two zeros before it, (1T00)_bt=(001T00)_bt.  The reverse digits of (001T00)_bt is (00T100)_bt = -18.  So 18 is in this sequence.
%t A233572 BTDigits[m_Integer, g_] :=
%t A233572 Module[{n = m, d, sign, t = g},
%t A233572   If[n != 0, If[n > 0, sign = 1, sign = -1; n = -n];
%t A233572    d = Ceiling[Log[3, n]]; If[3^d - n <= ((3^d - 1)/2), d++];
%t A233572    While[Length[t] < d, PrependTo[t, 0]]; t[[Length[t] + 1 - d]] = sign;
%t A233572    t = BTDigits[sign*(n - 3^(d - 1)), t]]; t];
%t A233572 BTrteQ[n_Integer] :=
%t A233572 Module[{t, trim = n/3^IntegerExponent[n, 3]},
%t A233572   t = BTDigits[trim, {0}]; DeleteDuplicates[t + Reverse[t]] == {0}];
%t A233572 sb = Select[Range[0, 950], BTrteQ[#] &]
%Y A233572 Cf. A002113, A061917, A006995, A057890, A134027, A233010, A233571
%K A233572 nonn,base
%O A233572 1,2
%A A233572 _Lei Zhou_, Dec 13 2013