A375690 a(1) = 3; for n > 1, a(n) is the smallest palindromic prime containing exactly 2 more digits on each end than a(n-1), with a(n-1) as the central substring.
3, 10301, 101030101, 1210103010121, 12121010301012121, 111212101030101212111, 3111121210103010121211113, 17311112121010301012121111371, 961731111212101030101212111137169, 3196173111121210103010121211113716913, 95319617311112121010301012121111371691359, 109531961731111212101030101212111137169135901, 1410953196173111121210103010121211113716913590141, 13141095319617311112121010301012121111371691359014131
Offset: 1
Examples
As a triangle: 3 10301 101030101 1210103010121 12121010301012121
Programs
-
Python
from sympy import isprime from itertools import product def agen(): # generator of terms an, s = 3, "3" while an > 0: yield an an = -1 for f, r in product("1379", "0123456789"): sn = f+r+s+r+f if isprime(t:=int(sn)): an, s = t, sn break print(list(agen())) # Michael S. Branicky, Aug 25 2024
Comments