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.
2, 727, 1572751, 1081572751801, 100210815727518012001, 1001410021081572751801200141001, 1000141001410021081572751801200141001410001, 100001610001410014100210815727518012001410014100016100001, 1000005310000161000141001410021081572751801200141001410001610000135000001
Offset: 0
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
Links
- Michael S. Branicky, Table of n, a(n) for n = 0..31
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
Comments