A108386
Primes p such that p's set of distinct digits is {1,3,7,9}.
Original entry on oeis.org
1973, 3719, 3917, 7193, 9137, 9173, 9371, 13397, 13799, 13997, 17393, 17939, 19373, 19379, 19739, 19793, 19937, 19973, 31379, 31397, 31793, 31799, 31973, 33179, 33791, 37139, 37199, 37991, 39317, 39371, 39719, 39791, 39971, 71339, 71399
Offset: 1
Cf.
A108382 ({1, 3, 7}),
A108383 ({1, 3, 9}),
A108384 ({1, 7, 9}),
A108385 ({3, 7, 9}),
A030096 (Primes whose digits are all odd).
A108383
Primes p such that p's set of distinct digits is {1,3,9}.
Original entry on oeis.org
139, 193, 1193, 1319, 1399, 1913, 1931, 1933, 1993, 3119, 3191, 3319, 3391, 3911, 3919, 3931, 9133, 9311, 9319, 9391, 9931, 11393, 11399, 11933, 11939, 13339, 13399, 13913, 13931, 13933, 13999, 19139, 19319, 19333, 19391, 19913, 19993, 31139
Offset: 1
Cf.
A108382 ({1, 3, 7}),
A108384 ({1, 7, 9}),
A108385 ({3, 7, 9}),
A108386 ({1, 3, 7, 9}),
A030096 (Primes whose digits are all odd).
-
Select[(Table[FromDigits/@Tuples[{1,3,9},n],{n,3,5}]//Flatten),PrimeQ[#] && Min[ DigitCount[#,10,{1,3,9}]]>0&] (* Harvey P. Dale, Apr 09 2017 *)
A108384
Primes p such that p's set of distinct digits is {1,7,9}.
Original entry on oeis.org
179, 197, 719, 971, 1979, 1997, 7919, 9719, 9791, 11197, 11719, 11779, 11971, 17191, 17791, 17911, 17971, 17977, 19717, 19777, 19979, 19997, 71119, 71191, 71719, 71917, 71971, 71999, 77191, 77719, 79111, 91711, 91771, 91997, 97117, 97171
Offset: 1
Cf.
A108382 ({1, 3, 7}),
A108383 ({1, 3, 9}),
A108385 ({3, 7, 9}),
A108386 ({1, 3, 7, 9}),
A030096 (Primes whose digits are all odd).
-
Flatten[Table[Select[FromDigits/@Select[Tuples[{1,7,9},n],Union[#]=={1,7,9}&],PrimeQ],{n,3,5}]] (* Harvey P. Dale, Feb 15 2016 *)
-
lista(nn) = forprime(p=179, nn, if(vecsort(digits(p), , 8)==[1, 7, 9], print1(p, ", "))) \\ Iain Fox, Oct 25 2017
A108385
Primes p such that p's set of distinct digits is {3,7,9}.
Original entry on oeis.org
379, 397, 739, 937, 3739, 3779, 3793, 3797, 7393, 7793, 7933, 7937, 7993, 9337, 9377, 9397, 9733, 9739, 9973, 33739, 33797, 33937, 33997, 37339, 37379, 37397, 37799, 37993, 37997, 39373, 39397, 39733, 39779, 39799, 39937, 39979, 73379, 73939
Offset: 1
Cf.
A108382 ({1, 3, 7}),
A108383 ({1, 3, 9}),
A108384 ({1, 7, 9}),
A108386 ({1, 3, 7, 9}),
A030096 (Primes whose digits are all odd).
-
Table[Select[FromDigits/@Select[Tuples[{3,7,9},n],SubsetQ[#,{3,7,9}]&], PrimeQ],{n,3,5}]//Flatten (* Harvey P. Dale, Sep 15 2016 *)
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
Showing 1-5 of 5 results.
Comments