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.

This page as a plain text file.
%I A246044 #31 Nov 10 2024 14:28:35
%S A246044 2,3,5,7,11,19,23,29,41,43,47,53,59,61,67,83,89,101,103,109,151,211,
%T A246044 223,227,229,233,257,263,269,307,353,383,401,409,431,433,443,449,487,
%U A246044 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
%N A246044 Monoprimatic permutable primes: Decimal prime numbers whose digits cannot be rearranged to form another prime number. No leading zeros allowed.
%H A246044 Giovanni Resta, <a href="/A246044/b246044.txt">Table of n, a(n) for n = 1..760</a> (terms < 10^13, terms 1..406 from Andreas Boe, terms 407..538 from Chai Wah Wu)
%e A246044 859 -> 589 (composite), 598 (even), 859 (prime), 895 (composite), 958 (even), 985 (composite) -> conclusion: one prime number.
%t A246044 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 *)
%o A246044 (Python)
%o A246044 from itertools import permutations
%o A246044 from sympy import prime, isprime
%o A246044 A246044 = []
%o A246044 for n in range(1,10**6):
%o A246044     p = prime(n)
%o A246044     for x in permutations(str(p)):
%o A246044         if x[0] != '0':
%o A246044             p2 = int(''.join(x))
%o A246044             if p2 != p and isprime(p2):
%o A246044                 break
%o A246044     else:
%o A246044         A246044.append(p) # _Chai Wah Wu_, Aug 27 2014
%Y A246044 Cf. A245808 (monoprimatic permutable numbers)
%Y A246044 Cf. A246043 (biprimatic permutable numbers), A246045 (biprimatic permutable primes).
%K A246044 nonn,base
%O A246044 1,1
%A A246044 _Andreas Boe_, Aug 23 2014