This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A233580 In balanced ternary notation, zerofree non-repdigit numbers that are either palindromes or sign reversed palindromes. 1
 2, 7, 16, 20, 32, 43, 61, 103, 124, 146, 182, 196, 292, 302, 338, 367, 421, 547, 601, 859, 913, 1039, 1096, 1172, 1280, 1312, 1600, 1640, 1748, 1816, 2560, 2624, 2732, 2776, 3064, 3092, 3200, 3283, 3445, 3823, 3985, 4759, 4921, 5299, 5461, 7663, 7825, 8203 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Zerofree numbers in balanced ternary notation can be used as reversible sign operators. This sequence collects such operators that are either in palindrome form or sign reversed palindrome form (which is defined as (n)_bt+Reverse((n)_bt)=0). LINKS Lei Zhou, Table of n, a(n) for n = 1..10000 EXAMPLE 2 = (1T)_bt in balanced ternary notation, where we use T to represent -1. 1T + T1 = 0, matches the definition of sign reversed palindrome form. So 2 is in the sequence. Other examples: 7 = (1T1_bt) - palindrome; in the sequence. 13 = (111)_bt - palindrome but repdigit; not in the sequence. 16 = (1TT1)_bt - palindrome; in the sequence. ... 52 = (1T0T1)_bt - palindrome but not zerofree; not in the sequence. MATHEMATICA BTDigits[m_Integer, g_] := (* This is to determine digits of a number in balanced ternary notation. *) Module[{n = m, d, sign, t = g},  If[n != 0, If[n > 0, sign = 1,   sign = -1; n = -n];   d = Ceiling[Log[3, n]]; If[3^d - n <= ((3^d - 1)/2), d++];   While[Length[t] < d, PrependTo[t, 0]]; t[[Length[t] + 1 - d]] = sign;   t = BTDigits[sign*(n - 3^(d - 1)), t]]; t]; BTnum[g_]:=Module[{bo=Reverse[g], data=0, i}, Do[data=data+3^(i-1)*bo[[i]], {i, 1, Length[bo]}]; data]; ct=0; n=0; dg=0; spool={}; res={}; While[ct<50, n++; nbits = BTDigits[n, {0}]; cdg=Length[nbits]; If[cdg>dg, If[Length[spool]>0, Do[bits=spool[[j]]; If[!MemberQ[bits, 0], rb=Reverse[bits]; sign=rb[]; bo=Join[bits, -sign*rb]; If[MemberQ[bo, -1], data=BTnum[bo]; ct++; AppendTo[res, data]]; bo=Join[bits, sign*rb]; If[MemberQ[bo, -1], data=BTnum[bo]; ct++; AppendTo[res, data]]], {j, 1, Length[spool]}]; Do[bits=spool[[j]]; If[!MemberQ[bits, 0], rb=Reverse[bits]; bo=Join[bits, {-1}, rb]; If[MemberQ[bo, -1], data=BTnum[bo]; ct++; AppendTo[res, data]]; bo=Join[bits, {1}, rb]; If[MemberQ[bo, -1], data=BTnum[bo]; ct++; AppendTo[res, data]]], {j, 1, Length[spool]}]; spool={}; dg=cdg]]; AppendTo[spool, nbits]]; Print[res] CROSSREFS Cf. A002113, A061917, A006995, A057890, A134027, A233010, A233571, A233572. Sequence in context: A129666 A288675 A135781 * A225323 A167236 A041573 Adjacent sequences:  A233577 A233578 A233579 * A233581 A233582 A233583 KEYWORD nonn,base,easy AUTHOR Lei Zhou, Dec 14 2013 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 November 14 12:16 EST 2019. Contains 329113 sequences. (Running on oeis4.)