A133187 Prime numbers formed by the concatenation of q and p, where q > p are also primes.
53, 73, 113, 137, 173, 193, 197, 233, 293, 313, 317, 373, 433, 593, 613, 617, 673, 677, 733, 797, 977, 1013, 1033, 1093, 1097, 1277, 1373, 1493, 1637, 1733, 1913, 1933, 1973, 1993, 1997, 2113, 2237, 2273, 2293, 2297, 2311, 2333, 2393, 2417, 2633, 2693, 2713
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
lim=2700;plim=Max[FromDigits[Rest[IntegerDigits[lim]]],FromDigits[Drop[IntegerDigits[lim],-1]]];f2p[{p_,q_}]:=FromDigits[Join[IntegerDigits[q],IntegerDigits[p]]];p=Prime[Range[PrimePi[plim]]];p2=Subsets[p,{2}];Union[Select[f2p/@p2,PrimeQ[#]&<=lim&]] (* James C. McMahon, Mar 12 2025 *)
-
Python
from sympy import isprime def ok(n): if not isprime(n): return False s = str(n) return any(s[i]!='0' and (q:=int(s[:i])) > (p:=int(s[i:])) and isprime(q) and isprime(p) for i in range(1, len(s))) print([k for k in range(2800) if ok(k)]) # Michael S. Branicky, Apr 05 2025
Extensions
a(27)-a(47) from James C. McMahon, Mar 12 2025
Comments