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.

A118598 Palindromes in base 7 (written in base 7).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 11, 22, 33, 44, 55, 66, 101, 111, 121, 131, 141, 151, 161, 202, 212, 222, 232, 242, 252, 262, 303, 313, 323, 333, 343, 353, 363, 404, 414, 424, 434, 444, 454, 464, 505, 515, 525, 535, 545, 555, 565, 606, 616, 626, 636, 646, 656, 666, 1001
Offset: 1

Views

Author

Martin Renner, May 08 2006

Keywords

Crossrefs

Programs

  • Mathematica
    (* get NextPalindrome from A029965 *) Select[NestList[NextPalindrome, 0, 109], Max@IntegerDigits@# < 7 &] (* Robert G. Wilson v, May 09 2006 *)
  • Python
    from sympy import integer_log
    from gmpy2 import digits
    def A118598(n):
        if n == 1: return 0
        y = 7*(x:=7**integer_log(n>>1,7)[0])
        return int((s:=digits(n-x,7))+s[-2::-1] if nChai Wah Wu, Jun 14 2024

Extensions

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