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.

A375956 a(0) = 2; for n > 0, a(n) is the smallest palindromic prime containing exactly n more digits on each end than a(n-1), with a(n-1) as the central substring.

Original entry on oeis.org

2, 727, 1572751, 1081572751801, 100210815727518012001, 1001410021081572751801200141001, 1000141001410021081572751801200141001410001, 100001610001410014100210815727518012001410014100016100001, 1000005310000161000141001410021081572751801200141001410001610000135000001
Offset: 0

Views

Author

Jean-Marc Rebert, Sep 03 2024

Keywords

Comments

a(32) has 1057 digits. - Michael S. Branicky, Sep 29 2024

Examples

			a(1) = 727, because 727 is prime and no lesser number verify this property.
As a triangle:
                                     2
                                    727
                                  1572751
                               1081572751801
                           100210815727518012001
                      1001410021081572751801200141001
                1000141001410021081572751801200141001410001
         100001610001410014100210815727518012001410014100016100001
 1000005310000161000141001410021081572751801200141001410001610000135000001
		

Crossrefs

Cf. A375690.

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime
    def A375956_gen(): # generator of terms
        a, l, r = 2, 1, 10
        yield 2
        for n in count(1):
            b = 10**n
            c = b*r
            for i in count(10**(n-1)):
                m = c*i+a*b+int(str(i)[::-1])
                if isprime(m):
                    yield m
                    a = m
                    l += n<<1
                    r *= 10**(n<<1)
                    break
    A375956_list = list(islice(A375956_gen(),20)) # Chai Wah Wu, Sep 27 2024