login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A180561 Primes that cannot become a different prime under any mapping of some single decimal digit <=> with some other single decimal digit. 46

%I #20 Oct 31 2023 17:38:03

%S 11,11779,22669,23333,33533,55333,74279,77999,78857,80603,84871,88177,

%T 88747,97039,103091,112181,119701,125813,128147,131143,133499,141587,

%U 158771,159979,164341,166063,173933,175781,219613,220279,222601,227387,229727,231317,238829

%N Primes that cannot become a different prime under any mapping of some single decimal digit <=> with some other single decimal digit.

%H Michael S. Branicky, <a href="/A180561/b180561.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Pri#primes">Index to Primes</a>, Primes that become a different prime under some mapping.

%F Complement of all the primes with the union of the sequences A175791, A175789, A180517 thru A180559.

%t 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]

%o (Python)

%o from sympy import isprime

%o def m(s):

%o return [s.translate({ord(c):ord(d), ord(d):ord(c)}) for c in set(s) for d in "0123456789" if d != c]

%o def ok(n):

%o return isprime(n) and not any(isprime(int(t)) for t in m(str(n)))

%o print([k for k in range(10**6) if ok(k)]) # _Michael S. Branicky_, Oct 31 2023

%Y Cf. A175791, A180517 thru A180559, A175789, A180560.

%K base,nonn

%O 1,1

%A _Zak Seidov_ and _Robert G. Wilson v_, Sep 09 2010

%E a(33) and beyond from _Michael S. Branicky_, Oct 31 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:01 EDT 2024. Contains 371936 sequences. (Running on oeis4.)