A108388
Transmutable primes: Primes with distinct digits d_i, i=1,m (2<=m<=4) such that simultaneously exchanging all occurrences of any one pair (d_i,d_j), i<>j results in a prime.
Original entry on oeis.org
13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 179, 191, 199, 313, 331, 337, 773, 911, 919, 1171, 1933, 3391, 7717, 9311, 11113, 11119, 11177, 11717, 11933, 33199, 33331, 77171, 77711, 77713, 79999, 97777, 99991, 113111, 131111, 131113, 131171, 131311
Offset: 1
179 is a term because it is prime and its three transmutations are all prime:
exchanging ('transmuting') 1 and 7: 179 ==> 719 (prime),
exchanging 1 and 9: 179 ==> 971 (prime) and
exchanging 7 and 9: 179 ==> 197 (prime).
(As 791 and 917 are not prime, 179 is not a term of A068652 or A003459 also.).
Similarly, 1317713 is transmutable:
exchanging all 1's and 3s: 1317713 ==> 3137731 (prime),
exchanging all 1's and 7s: 1317713 ==> 7371173 (prime) and
exchanging all 3s and 7s: 1317713 ==> 1713317 (prime).
Cf.
A108382,
A108383,
A108384,
A108385,
A108386,
A108389 (transmutable primes with four distinct digits),
A083983 (transmutable primes with two distinct digits),
A108387 (doubly-transmutable primes),
A006567 (reversible primes),
A002385 (palindromic primes),
A068652 (every cyclic permutation is prime),
A003459 (absolute primes).
-
from gmpy2 import is_prime
from itertools import combinations, count, islice, product
def agen(): # generator of terms
for d in count(2):
for p in product("1379", repeat=d):
p, s = "".join(p), sorted(set(p))
if len(s) == 1: continue
if is_prime(t:=int(p)):
if all(is_prime(int(p.translate({ord(c):ord(d), ord(d):ord(c)}))) for c, d in combinations(s, 2)):
yield t
print(list(islice(agen(), 50))) # Michael S. Branicky, Dec 15 2023
A108389
Transmutable primes with four distinct digits.
Original entry on oeis.org
133999337137, 139779933779, 173139331177, 173399913979, 177793993177, 179993739971, 391331737931, 771319973999, 917377131371, 933971311913, 997331911711, 1191777377177, 9311933973733, 9979333919939, 19979113377173, 31997131171111, 37137197179931, 37337319113911
Offset: 1
a(0)=133999337137 is the smallest transmutable prime with four distinct digits (1,3,7,9):
exchanging all 1's and 3's: 133999337137 ==> 311999117317 (prime),
exchanging all 1's and 7's: 133999337137 ==> 733999331731 (prime),
exchanging all 1's and 9's: 133999337137 ==> 933111337937 (prime),
exchanging all 3's and 7's: 133999337137 ==> 177999773173 (prime),
exchanging all 3's and 9's: 133999337137 ==> 199333997197 (prime) and
exchanging all 7's and 9's: 133999337137 ==> 133777339139 (prime).
No smaller prime with four distinct digits transmutes into six other primes.
Cf.
A108386 (Primes p such that p's set of distinct digits is {1, 3, 7, 9}),
A108388 (transmutable primes),
A083983 (transmutable primes with two distinct digits),
A108387 (doubly-transmutable primes),
A006567 (reversible primes),
A002385 (palindromic primes),
A068652 (every cyclic permutation is prime),
A107845 (transposable-digit primes),
A003459 (absolute primes),
A057876 (droppable-digit primes).
A109093
Fully-transmutable primes: Transmutable primes such that each transmutation is itself a transmutable prime (A108388).
Original entry on oeis.org
139119131, 193113191, 319339313, 391331393, 913993919, 931991939, 1319999199391, 1913333133931, 3139999399193, 3931111311913, 9193333933139, 9391111911319, 11333911193113, 11999311139119, 33111933391331
Offset: 0
The first six terms share the digit pattern d1 d2 d3 d1 d1 d3 d1 d2 d1. Each of these terms is a (9-digit) prime corresponding to one of the 3! = 6 bijective mappings of {1,3,9} onto {d1,d2,d3}. There are no other such primes with nine or fewer digits.
Cf.
A108388 (transmutable primes),
A083983 (transmutable primes with two distinct digits),
A108389 (transmutable primes with four distinct digits),
A003459 (absolute primes),
A108387 (doubly-transmutable primes).
Showing 1-3 of 3 results.
Comments