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.

A103836 Smallest palindromic prime p, larger than previous term, such that concatenation of n and p is a prime.

Original entry on oeis.org

3, 11, 181, 373, 12821, 14741, 32323, 72227, 74747, 77977, 78887, 79997, 90709, 94049, 94849, 98689, 1055501, 1065601, 1114111, 1129211, 1134311, 1177711, 1180811, 1186811, 1190911, 1262621, 1333331, 1338331, 1407041, 1409041, 1411141, 1461641, 1463641
Offset: 1

Views

Author

Zak Seidov, Mar 30 2005

Keywords

Comments

Examples

			a(4) = 373 because 4373 is prime, while 4191, 4313, 4353 are all composite.
		

Crossrefs

Subsequence of A002385.

Programs

  • Python
    from sympy import isprime, nextprime
    def ispal(n): s = str(n); return s == s[::-1]
    def aupto(lim):
      n, p, alst = 1, 2, []
      while p <= lim:
        if ispal(p) and isprime(int(str(n)+str(p))): n, alst = n + 1, alst + [p]
        p = nextprime(p)
      return alst
    print(aupto(1463641)) # Michael S. Branicky, Mar 11 2021