The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A118599 Palindromes in base 8 (written in base 8). 9

%I #12 Jun 15 2024 09:26:09

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

%T 202,212,222,232,242,252,262,272,303,313,323,333,343,353,363,373,404,

%U 414,424,434,444,454,464,474,505,515,525,535,545,555,565,575,606,616

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

%t (* get NextPalindrome from A029965 *) Select[NestList[NextPalindrome, 0, 70], Max@IntegerDigits@# < 8 &] (* _Robert G. Wilson v_, May 09 2006 *)

%o (Python)

%o def A118599(n):

%o if n == 1: return 0

%o y = (x:=1<<(m:=n.bit_length()-2)-m%3)<<3

%o return int((s:=oct(n-x)[2:])+s[-2::-1] if n<x+y else (s:=oct(n-y)[2:])+s[::-1]) # _Chai Wah Wu_, Jun 14 2024

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

%K nonn,base,changed

%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 June 17 03:24 EDT 2024. Contains 373432 sequences. (Running on oeis4.)