cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118597 Palindromes in base 6 (written in base 6).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 11, 22, 33, 44, 55, 101, 111, 121, 131, 141, 151, 202, 212, 222, 232, 242, 252, 303, 313, 323, 333, 343, 353, 404, 414, 424, 434, 444, 454, 505, 515, 525, 535, 545, 555, 1001, 1111, 1221, 1331, 1441, 1551, 2002, 2112, 2222, 2332, 2442, 2552
Offset: 1

Views

Author

Martin Renner, May 08 2006

Keywords

Comments

Also palindromes with no digit greater than 5. - Harvey P. Dale, Nov 26 2019

Crossrefs

Programs

  • Mathematica
    (* get NextPalindrome from A029965 *) Select[NestList[NextPalindrome, 0, 125], Max@IntegerDigits@# < 6 &] (* Robert G. Wilson v, May 09 2006 *)
    Select[FromDigits/@Tuples[Range[0,5],4],PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 26 2019 *)
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A118597(n):
        if n == 1: return 0
        y = 6*(x:=6**integer_log(n>>1,6)[0])
        return int((s:=digits(n-x,6))+s[-2::-1] if nChai Wah Wu, Jun 14 2024

Extensions

Corrected and extended by Robert G. Wilson v, May 09 2006