login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118594 Palindromes in base 3 (written in base 3). 12
0, 1, 2, 11, 22, 101, 111, 121, 202, 212, 222, 1001, 1111, 1221, 2002, 2112, 2222, 10001, 10101, 10201, 11011, 11111, 11211, 12021, 12121, 12221, 20002, 20102, 20202, 21012, 21112, 21212, 22022, 22122, 22222, 100001, 101101, 102201, 110011 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

The number of n-digit terms is given by A225367. - M. F. Hasler, May 05 2013 [Moved here on May 08 2013]

Digit-wise application of A000578 (and also superposition of a(n) with its horizontal OR vertical reflection) yields A006072. - M. F. Hasler, May 08 2013

Equivalently, palindromes k (written in base 10) such that 4*k is a palindrome. - Bruno Berselli, Sep 12 2018

LINKS

Table of n, a(n) for n=1..39.

Eric Weisstein's World of Mathematics, Palindromic Number

Eric Weisstein's World of Mathematics, Ternary

MATHEMATICA

(* get NextPalindrome from A029965 *) Select[NestList[NextPalindrome, 0, 1110], Max@IntegerDigits@# < 3 &] (* Robert G. Wilson v, May 09 2006 *)

Select[FromDigits/@Tuples[{0, 1, 2}, 8], IntegerDigits[#]==Reverse[ IntegerDigits[ #]]&] (* Harvey P. Dale, Apr 20 2015 *)

PROG

(PARI) {for(l=1, 5, u=vector((l+1)\2, i, 10^(i-1)+(2*i-1<l)*10^(l-i))~; forvec(v=vector((l+1)\2, i, [l>1&&i==1, 2]), print1(v*u", ")))} \\ The n-th term could be produced by using (partial sums of) A225367 to skip all shorter terms, and then skipping the adequate number of vectors v until n is reached.  - M. F. Hasler, May 08 2013

(Sage)

[int(n.str(base=3)) for n in (0..757) if Word(n.digits(3)).is_palindrome()] # Peter Luschny, Sep 13 2018

CROSSREFS

Cf. A007089, A014190, A057148, A118595, A118596, A118597, A118598, A118599, A118600, A002113.

Sequence in context: A018711 A018737 A162468 * A263720 A235609 A018351

Adjacent sequences:  A118591 A118592 A118593 * A118595 A118596 A118597

KEYWORD

nonn,base,easy

AUTHOR

Martin Renner, May 08 2006

EXTENSIONS

More terms from Robert G. Wilson v, May 09 2006

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 25 11:32 EST 2020. Contains 338623 sequences. (Running on oeis4.)