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.

Showing 1-1 of 1 results.

A368944 Palindromes in base 10 that are the product of two repdigit numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 121, 222, 242, 333, 363, 444, 484, 555, 616, 666, 777, 888, 999, 1111, 1221, 2222, 2442, 3333, 3663, 4444, 4884, 5445, 5555, 6666, 6776, 7777, 8888, 9999, 11111, 12221, 12321, 22222, 24442, 24642
Offset: 1

Views

Author

Stefano Spezia, Jan 10 2024

Keywords

Comments

A002113 and A368955 are supersequences.
Palindromes in base 10 of the form i*j*(10^k - 1)*(10^m - 1)/81 where 0 <= i, j <= 9 and k, m >= 0.

Examples

			121 = 11*11, 222 = 111*2, 242 = 22*11, ...
		

Crossrefs

Cf. A002113, A002283, A010785 (subsequence), A368955.

Programs

  • Mathematica
    repQ[n_] := SameQ @@ IntegerDigits[n]; q[n_] := PalindromeQ[n] && AnyTrue[Divisors[n], repQ[#] && repQ[n/#] &]; q[0] = True; Select[Range[0, 25000], q] (* Amiram Eldar, Jan 12 2024 *)
  • Python
    from itertools import count, takewhile
    def ispal(n): return (s:=str(n)) == s[::-1]
    def repdigits():
        yield 0
        yield from ((10**d-1)//9*i for d in count(1) for i in range(1, 10))
    def aupto(LIMIT): # use LIMIT = 10**450 for 10K+-term b-file
        s, R = set(), list(takewhile(lambda x:x<=LIMIT, repdigits()))
        for i, r1 in enumerate(R):
            for r2 in R[i:]:
                p = r1*r2
                if p > LIMIT: break
                if ispal(p): s.add(p)
        return sorted(s)
    print(aupto(3*10**4)) # Michael S. Branicky, Jan 10 2024
Showing 1-1 of 1 results.