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.

A249157 Palindromic in bases 11 and 13.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 84, 366, 510, 732, 876, 1020, 1098, 1242, 1464, 10248, 30252, 31110, 62220, 103704, 146541, 3382050, 3698730, 4391268, 225622530, 272466250, 413186676, 713998530, 801837204, 848770222, 912265732
Offset: 1

Views

Author

Ray Chandler, Oct 27 2014

Keywords

Comments

Intersection of A029956 and A029958.

Examples

			366 is a term since 366 = 303 base 11 and 366 = 222 base 13.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_Integer,base_Integer]:=Block[{idn=IntegerDigits[n,base]},idn==Reverse[idn]];Select[Range[10^6]-1,palQ[#,11]&&palQ[#,13]&]
    Select[Range[0,44*10^5],AllTrue[IntegerDigits[#,{11,13}],PalindromeQ]&] (* The program generates the first 30 terms of the sequence. *) (* Harvey P. Dale, May 15 2025 *)
  • Python
    from gmpy2 import digits
    def palQ(n, b): # check if n is a palindrome in base b
        s = digits(n, b)
        return s == s[::-1]
    def palQgen(l, b): # unordered generator of palindromes in base b of length <= 2*l
        if l > 0:
            yield 0
            for x in range(1, b**l):
                s = digits(x, b)
                yield int(s+s[-2::-1], b)
                yield int(s+s[::-1], b)
    A249157_list = sorted([n for n in palQgen(6,11) if palQ(n,13)]) # Chai Wah Wu, Nov 25 2014