login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A134027 Nonnegative numbers that are palindromes in balanced ternary representation. 11
0, 1, 4, 7, 10, 13, 16, 28, 40, 43, 52, 61, 73, 82, 91, 103, 112, 121, 124, 160, 196, 208, 244, 280, 292, 328, 364, 367, 394, 421, 457, 484, 511, 547, 574, 601, 613, 640, 667, 703, 730, 757, 793, 820, 847, 859, 886, 913, 949, 976, 1003, 1039, 1066, 1093, 1096 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

A134028(a(n)) = a(n).

REFERENCES

D. E. Knuth, The Art of Computer Programming, Addison-Wesley, Reading, MA, Vol 2, pp 173-175.

LINKS

Lei Zhou, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Palindromic Number

Wikipedia, Balanced Ternary

EXAMPLE

a(10) = 43 = 1*3^4 - 1*3^3 - 1*3^2 - 1*3^1 + 1*3^0 == '+---+';

a(11) = 52 = 1*3^4 - 1*3^3 + 0*3^2 - 1*3^1 + 1*3^0 == '+-0-+';

a(12) = 61 = 1*3^4 - 1*3^3 + 1*3^2 - 1*3^1 + 1*3^0 == '+-+-+';

a(13) = 73 = 1*3^4 + 0*3^3 - 1*3^2 + 0*3^1 + 1*3^0 == '+0-0+'.

MATHEMATICA

balTernDigits[0] := {0}; balTernDigits[n_ /; n > 0] := Module[{unParsed = n, currRem, currExp = 1, digitList = {}, nextDigit}, While[unParsed > 0, If[unParsed == 3^(currExp - 1), digitList = Append[digitList, 1]; unParsed = 0, currRem = Mod[unParsed, 3^currExp]/3^(currExp - 1); nextDigit = Switch[ currRem, 0, 0, 2, -1, 1, 1]; digitList = Append[ digitList, nextDigit]; unParsed = unParsed - nextDigit*3^(currExp - 1)]; currExp++]; digitList = Reverse[digitList]; Return[ digitList]]; balTernDigits[n_ /; n < 0] := (-1) balTernDigits[ Abs[ n]]; palQ[n_] := n == Reverse@ n; Select[ Range@ 1300, palQ@ balTernDigits@# &] (* Robert G. Wilson v, Jun 17 2014 *)

CROSSREFS

Cf. A014190.

Sequence in context: A090852 A182112 A090955 * A143455 A087065 A001197

Adjacent sequences:  A134024 A134025 A134026 * A134028 A134029 A134030

KEYWORD

nonn,base

AUTHOR

Reinhard Zumkeller, Oct 19 2007

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 18 18:04 EDT 2017. Contains 290732 sequences.