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.

Showing 1-1 of 1 results.

A110787 Least palindrome which when appended to the n-th palindrome gives a prime.

Original entry on oeis.org

1, 3, 1, 1, 3, 1, 1, 3, 7, 3, 3, 1, 3, 7, 1, 3, 1, 1, 3, 7, 3, 9, 77, 1, 3, 131, 1, 3, 7, 9, 1, 171, 3, 1, 1, 9, 11, 7, 7, 7, 77, 1, 3, 3, 1, 3, 3, 1, 9, 11, 1, 9, 1, 7, 3, 101, 111, 3, 1, 3, 11, 1, 77, 7, 1, 131, 1, 3, 7, 3, 3, 1, 9, 3, 1, 1, 3, 1, 9, 7, 33, 111, 7, 3, 3, 11, 3, 77, 1, 99, 7, 7, 11, 1, 1
Offset: 1

Views

Author

Amarnath Murthy, Aug 12 2005

Keywords

Comments

A002113(n) concatenated with a(n) is a prime. A110786(n) is that prime. - Franklin T. Adams-Watters, Oct 11 2006

Crossrefs

Cf. A110786.

Programs

  • Python
    from itertools import count
    from sympy import isprime
    def A110787(n):
        s = str((c:=n+1-x)*x+int(str(c)[-2::-1] or 0) if n+1<(x:=10**(len(str(n+1>>1))-1))+(y:=10*x) else (c:=n+1-y)*y+int(str(c)[::-1] or 0))
        for k in count(2):
            if isprime(int(s+str(q:=(c:=k-x)*x+int(str(c)[-2::-1] or 0) if k<(x:=10**(len(str(k>>1))-1))+(y:=10*x) else (c:=k-y)*y+int(str(c)[::-1] or 0)))):
                return int(q) # Chai Wah Wu, Jul 10 2024

Extensions

More terms from Franklin T. Adams-Watters, Oct 11 2006
Showing 1-1 of 1 results.