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.

Original entry on oeis.org

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

Views

Author

Zak Seidov and Robert G. Wilson v, Sep 09 2010

Keywords

Crossrefs

Programs

  • 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]
  • 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

Formula

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

Extensions

a(33) and beyond from Michael S. Branicky, Oct 31 2023