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-2 of 2 results.

A062351 Palindromic primes with strictly increasing digits up to the middle and then strictly decreasing.

Original entry on oeis.org

2, 3, 5, 7, 11, 131, 151, 181, 191, 353, 373, 383, 787, 797, 12421, 12721, 12821, 13831, 13931, 14741, 17971, 34543, 34843, 35753, 1235321, 1245421, 1257521, 1268621, 1278721, 1456541, 1469641, 1489841, 1579751, 1589851, 3479743
Offset: 1

Views

Author

Amarnath Murthy, Jun 23 2001

Keywords

Comments

The last term of the finite series is a(63) = 123467898764321.

Examples

			13831 belongs to the sequence as it is a palindromic prime in which the digits are increasing up to the middle digit 8 and then decreasing.
		

Crossrefs

Cf. A343524 (strictly increasing palindromes), A062352, A084836.

Programs

  • Python
    from sympy import isprime
    from itertools import combinations
    def agen():
      for digits in range(1, 19):
        for left in combinations("123456789", (digits+1)//2):
          left = "".join(left)
          yield int(left + (left[:digits//2])[::-1])
    print(list(filter(isprime, agen()))) # Michael S. Branicky, Apr 25 2021

Extensions

Corrected and edited by Patrick De Geest, Jun 07 2003

A084837 Palindromic primes with nonincreasing digits up to the middle and then nondecreasing.

Original entry on oeis.org

2, 3, 5, 7, 11, 101, 313, 727, 757, 919, 929, 31013, 72227, 73037, 73237, 74047, 75557, 76367, 76667, 77377, 77477, 91019, 93139, 93239, 94049, 94349, 96269, 96469, 97379, 97579, 98389, 98689, 3211123, 3222223, 3310133, 3321233, 3331333, 7100017, 7300037, 7310137
Offset: 1

Views

Author

Patrick De Geest, Jun 07 2003

Keywords

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice, combinations_with_replacement as mc
    def agen(): # generator of terms
        yield from (2, 3, 5, 7, 11)
        for d in count(2):
            nind = (int("".join(m+m[:-1][::-1])) for m in mc("9876543210", d))
            yield from sorted(filter(isprime, nind))
    print(list(islice(agen(), 40))) # Michael S. Branicky, Jun 26 2022

Extensions

a(38) and beyond from Michael S. Branicky, Jun 26 2022
Showing 1-2 of 2 results.