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.

This page as a plain text file.
%I A088784 #23 Jan 05 2022 10:51:06
%S A088784 53,5347,5953,6761,137131,179173,211199,223211,239233,263257,359353,
%T A088784 541523,593587,613607,631619,653647,659653,757751,809797,977971,
%U A088784 997991,1009997,11091103,11291123,12371231,13991381,15591553,17831777,19311913,19791973,19931987,23092297
%N A088784 Primes formed by concatenating a prime with the preceding prime.
%H A088784 K. D. Bajpai, <a href="/A088784/b088784.txt">Table of n, a(n) for n = 1..10300</a>
%e A088784 a(2) = 5347 because 5347 is 53 (a prime) concatenated with 47 (the preceding prime).
%t A088784 concatpr[n_]:=FromDigits[Join[IntegerDigits[n],IntegerDigits[ NextPrime[ n,-1]]]]; Select[concatpr/@Prime[Range[400]],PrimeQ] (* _Harvey P. Dale_, May 12 2011 *)
%o A088784 (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
%o A088784 (Python)
%o A088784 from itertools import islice
%o A088784 from sympy import isprime, nextprime
%o A088784 def agen(): # generator of terms
%o A088784     p, pstr = 2, "2"
%o A088784     while True:
%o A088784         q = nextprime(p)
%o A088784         qstr = str(q)
%o A088784         t = int(qstr + pstr)
%o A088784         if isprime(t):
%o A088784             yield t
%o A088784         p, pstr = q, qstr
%o A088784 print(list(islice(agen(), 32))) # _Michael S. Branicky_, Jan 05 2022
%Y A088784 Cf. A088712.
%K A088784 base,nonn
%O A088784 1,1
%A A088784 Chuck Seggelin (barkeep(AT)plasteredDragon.com), Oct 15 2003
%E A088784 Terms a(30), a(31) and a(32) added by _K. D. Bajpai_, Aug 14 2014