login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118600 Palindromes in base 9 (written in base 9). 9

%I #9 Dec 01 2014 22:21:41

%S 0,1,2,3,4,5,6,7,8,11,22,33,44,55,66,77,88,101,111,121,131,141,151,

%T 161,171,181,202,212,222,232,242,252,262,272,282,303,313,323,333,343,

%U 353,363,373,383,404,414,424,434,444,454,464,474,484,505,515,525,535,545

%N Palindromes in base 9 (written in base 9).

%H Chai Wah Wu, <a href="/A118600/b118600.txt">Table of n, a(n) for n = 1..1457</a>

%t (* get NextPalindrome from A029965 *) Select[NestList[NextPalindrome, 0, 62], Max@IntegerDigits@# < 9 &] (* _Robert G. Wilson v_ *)

%o (Python)

%o from gmpy2 import digits

%o def palgenbase(l,b): # generator of palindromes in base b <=10 of length <= 2*l, written in base b

%o ....if l > 0:

%o ........yield 0

%o ........for x in range(1,l+1):

%o ............for y in range(b**(x-1),b**x):

%o ................s = digits(y,b)

%o ................yield int(s+s[-2::-1])

%o ............for y in range(b**(x-1),b**x):

%o ................s = digits(y,b)

%o ................yield int(s+s[::-1])

%o A118600_list = list(palgenbase(3,9)) # _Chai Wah Wu_, Dec 01 2014

%Y Cf. A029955, A057148, A118594, A118595, A118596, A118597, A118598, A118599, A118600, A002113.

%K nonn,base

%O 1,3

%A _Martin Renner_, May 08 2006

%E More terms from _Robert G. Wilson v_, May 09 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)