OFFSET
1,1
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..760 (terms < 10^13, terms 1..406 from Andreas Boe, terms 407..538 from Chai Wah Wu)
EXAMPLE
859 -> 589 (composite), 598 (even), 859 (prime), 895 (composite), 958 (even), 985 (composite) -> conclusion: one prime number.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Andreas Boe, Aug 23 2014
STATUS
approved