cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A180561 #24 Jun 12 2025 03:40:05
%S A180561 11,11779,22669,23333,33533,55333,74279,77999,78857,80603,84871,88177,
%T A180561 88747,97039,103091,112181,119701,125813,128147,131143,133499,141587,
%U A180561 158771,159979,164341,166063,173933,175781,219613,220279,222601,227387,229727,231317,238829
%N A180561 Primes that cannot become a different prime under any mapping of some single decimal digit <=> with some other single decimal digit.
%H A180561 Michael S. Branicky, <a href="/A180561/b180561.txt">Table of n, a(n) for n = 1..10000</a>
%H A180561 <a href="/index/Pri#primes">Index to Primes</a>, Primes that become a different prime under some mapping.
%F A180561 Complement of all the primes with the union of the sequences A175791, A175789, A180517 thru A180559.
%t A180561 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 A180561 (Python)
%o A180561 from sympy import isprime
%o A180561 def m(s):
%o A180561     return [s.translate({ord(c):ord(d), ord(d):ord(c)}) for c in set(s) for d in "0123456789" if d != c]
%o A180561 def ok(n):
%o A180561     return isprime(n) and not any(isprime(int(t)) for t in m(str(n)))
%o A180561 print([k for k in range(10**6) if ok(k)]) # _Michael S. Branicky_, Oct 31 2023
%Y A180561 Cf. A175791, A180517 thru A180559, A175789, A180560.
%K A180561 base,nonn
%O A180561 1,1
%A A180561 _Zak Seidov_ and _Robert G. Wilson v_, Sep 09 2010
%E A180561 a(33) and beyond from _Michael S. Branicky_, Oct 31 2023