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.

Showing 1-2 of 2 results.

A198146 Primes remaining primes under map 2<=>9 (interchange of decimal digits 2 and 9).

Original entry on oeis.org

2293, 2393, 2591, 2693, 2791, 2903, 2957, 5297, 5927, 7297, 7927, 8293, 8923, 9203, 9257, 9323, 9521, 9623, 9721, 9923, 12491, 12497, 12907, 12911, 12967, 12973, 13291, 13921, 14293, 14923, 17291, 17293, 17921, 17923, 19207, 19211, 19267, 19273, 19421, 19427
Offset: 1

Views

Author

Zak Seidov, Oct 21 2011

Keywords

Comments

Only primes containing at least one "2" and one "9" are considered.
Inspired by history (told by VIA himself) that most often mistakes made by V. I. Arnold were caused by mixing 2's and 9's (and also 3's and 5's) in the lengthy calculations by hand.

Examples

			2293, 9923 both primes; 2393, 9323 both primes.
		

Crossrefs

Cf. A198047 (map 3 <=> 5).

Programs

  • Mathematica
    p = 29; Reap[Do[id = IntegerDigits[p]; If[Count[id, 2] > 0 && Count[id, 9] > 0 && PrimeQ[FromDigits[(id /. {2 -> a, 9 -> 2}) /. {a -> 9}]], Sow[p]]; p = NextPrime[p], {10^4}]][[2,1]]

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
Showing 1-2 of 2 results.