login
A180561
Primes that cannot become a different prime under any mapping of some single decimal digit <=> with some other single decimal digit.
46
11, 11779, 22669, 23333, 33533, 55333, 74279, 77999, 78857, 80603, 84871, 88177, 88747, 97039, 103091, 112181, 119701, 125813, 128147, 131143, 133499, 141587, 158771, 159979, 164341, 166063, 173933, 175781, 219613, 220279, 222601, 227387, 229727, 231317, 238829
OFFSET
1,1
LINKS
Index to Primes, Primes that become a different prime under some mapping.
FORMULA
Complement of all the primes with the union of the sequences A175791, A175789, A180517 thru A180559.
MATHEMATICA
fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, s[[1]]] || MemberQ[id, s[[2]]]) && PrimeQ[ FromDigits[id /. {s[[1]] -> s[[2]], s[[2]] -> s[[1]] }] ]]; t = Union@ Flatten@ Table[s = {j, k}; Select[ Prime@ Range@ 25000, fQ], {j, 0, 8}, {k, j + 1, 9}] ]]; Complement[ Prime@ Range@ 25000, t]
PROG
(Python)
from sympy import isprime
def m(s):
return [s.translate({ord(c):ord(d), ord(d):ord(c)}) for c in set(s) for d in "0123456789" if d != c]
def ok(n):
return isprime(n) and not any(isprime(int(t)) for t in m(str(n)))
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Oct 31 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
EXTENSIONS
a(33) and beyond from Michael S. Branicky, Oct 31 2023
STATUS
approved