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.

A133187 Prime numbers formed by the concatenation of q and p, where q > p are also primes.

Original entry on oeis.org

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

Views

Author

Tom Mueller (muel4503(AT)uni-trier.de), Dec 17 2007

Keywords

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.

Crossrefs

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