login
A133187
Prime numbers formed by the concatenation of q and p, where q > p are also primes.
2
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,1
COMMENTS
These numbers are called Caesar primes because the birth date of Julius Caesar (July 13th) provides one example of such a number, i.e. p=7 and q=13 give the prime 137.
LINKS
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 *)
PROG
(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
CROSSREFS
Sequence in context: A045807 A007644 A136073 * A057667 A160041 A013538
KEYWORD
base,nonn
AUTHOR
Tom Mueller (muel4503(AT)uni-trier.de), Dec 17 2007
EXTENSIONS
a(27)-a(47) from James C. McMahon, Mar 12 2025
STATUS
approved