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.

A386528 Primes which remain primes after the mapping {1 -> 3, 3 -> 5, 5 -> 7, 7 -> 9, 9 -> 1} of its decimal digits.

Original entry on oeis.org

2, 3, 5, 19, 31, 37, 41, 59, 97, 131, 137, 151, 157, 181, 191, 199, 211, 227, 239, 271, 281, 307, 349, 359, 367, 409, 419, 457, 461, 479, 509, 541, 569, 619, 631, 641, 691, 727, 797, 821, 827, 829, 881, 907, 919, 947, 971, 977, 991, 1009, 1021, 1049, 1069, 1087, 1097, 1109, 1151
Offset: 1

Views

Author

Tristan J. Jones and Robert G. Wilson v, Aug 21 2025

Keywords

Comments

Of the 10! possible nontrivial decimal digital mappings, this one was chosen for its inclusion of all the odd numbers and none of the even numbers.

Examples

			19 is a term since the mapping produces 31, which is prime;
31 is a term since the mapping produces 53, which is prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ[ FromDigits[ IntegerDigits[ n] /. {1 -> 3, 3 -> 5, 5 -> 7, 7 -> 9, 9 -> 1}]]; Select[ Prime@ Range@ 200, fQ]
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and isprime(int(str(n).translate(str.maketrans("13579","35791"))))
    print([k for k in range(1200) if ok(k)]) # Michael S. Branicky, Aug 24 2025