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.

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.

Original entry on oeis.org

3, 10301, 101030101, 1210103010121, 12121010301012121, 111212101030101212111, 3111121210103010121211113, 17311112121010301012121111371, 961731111212101030101212111137169, 3196173111121210103010121211113716913, 95319617311112121010301012121111371691359, 109531961731111212101030101212111137169135901, 1410953196173111121210103010121211113716913590141, 13141095319617311112121010301012121111371691359014131
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 24 2024

Keywords

Comments

This is a finite sequence since at a(14) there is no way to add 2 more digits and reach a palindromic prime.

Examples

			As a triangle:
          3
        10301
      101030101
    1210103010121
  12121010301012121
		

Crossrefs

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