Weakly prime number


In number theory, a prime number is called weakly prime if it becomes not prime when any one of its digits is changed to every single other digit. Decimal digits are usually assumed.
The first weakly prime numbers are:
For the first of these, each of the 54 numbers 094001, 194001, 394001,..., 294009 are composite. A weakly prime base-b number with n digits must produce × n composite numbers when a digit is changed.
In 2007 Jens Kruse Andersen found the 1000-digit weakly prime /99 + 21686652. This is the largest known weakly prime number.
There are infinitely many weakly prime numbers in any base. Furthermore, for any fixed base there is a positive proportion of such primes.
The smallest base b weakly primes for b = 1 to 16 are: