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.

A246044 Monoprimatic permutable primes: Decimal prime numbers whose digits cannot be rearranged to form another prime number. No leading zeros allowed.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23, 29, 41, 43, 47, 53, 59, 61, 67, 83, 89, 101, 103, 109, 151, 211, 223, 227, 229, 233, 257, 263, 269, 307, 353, 383, 401, 409, 431, 433, 443, 449, 487, 499, 503, 509, 523, 541, 557, 599, 601, 607, 661, 677, 773, 809, 827, 829, 853, 859, 881, 883, 887, 929, 997, 1447, 1451, 1481, 2003, 2017, 2029, 2087
Offset: 1

Views

Author

Andreas Boe, Aug 23 2014

Keywords

Examples

			859 -> 589 (composite), 598 (even), 859 (prime), 895 (composite), 958 (even), 985 (composite) -> conclusion: one prime number.
		

Crossrefs

Cf. A245808 (monoprimatic permutable numbers)
Cf. A246043 (biprimatic permutable numbers), A246045 (biprimatic permutable primes).

Programs

  • Mathematica
    mppQ[n_]:=Total[Boole[PrimeQ[Select[FromDigits/@Permutations[IntegerDigits[n]],IntegerLength[ #] == IntegerLength[ n]&]]]] ==1; Select[Prime[Range[500]],mppQ] (* Harvey P. Dale, Dec 06 2021 *)
  • Python
    from itertools import permutations
    from sympy import prime, isprime
    A246044 = []
    for n in range(1,10**6):
        p = prime(n)
        for x in permutations(str(p)):
            if x[0] != '0':
                p2 = int(''.join(x))
                if p2 != p and isprime(p2):
                    break
        else:
            A246044.append(p) # Chai Wah Wu, Aug 27 2014