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.

A088784 Primes formed by concatenating a prime with the preceding prime.

Original entry on oeis.org

53, 5347, 5953, 6761, 137131, 179173, 211199, 223211, 239233, 263257, 359353, 541523, 593587, 613607, 631619, 653647, 659653, 757751, 809797, 977971, 997991, 1009997, 11091103, 11291123, 12371231, 13991381, 15591553, 17831777, 19311913, 19791973, 19931987, 23092297
Offset: 1

Views

Author

Chuck Seggelin (barkeep(AT)plasteredDragon.com), Oct 15 2003

Keywords

Examples

			a(2) = 5347 because 5347 is 53 (a prime) concatenated with 47 (the preceding prime).
		

Crossrefs

Cf. A088712.

Programs

  • Mathematica
    concatpr[n_]:=FromDigits[Join[IntegerDigits[n],IntegerDigits[ NextPrime[ n,-1]]]]; Select[concatpr/@Prime[Range[400]],PrimeQ] (* Harvey P. Dale, May 12 2011 *)
  • PARI
    for(n=1,10^3,p=prime(n); q=concat(Str(p),Str(precprime(p-1))); if(isprime(eval(q)), print1(q,", "))) \\ Derek Orr, Aug 14 2014
    
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        p, pstr = 2, "2"
        while True:
            q = nextprime(p)
            qstr = str(q)
            t = int(qstr + pstr)
            if isprime(t):
                yield t
            p, pstr = q, qstr
    print(list(islice(agen(), 32))) # Michael S. Branicky, Jan 05 2022

Extensions

Terms a(30), a(31) and a(32) added by K. D. Bajpai, Aug 14 2014