If you start with the number 24 and seek primes by changing a single digit, you can find two: 23 and 29. If you start with 130, you can find three: 131, 137, and 139. If you start with 73, you can find seven: 13, 23, 43, 53, 71, 79, and 83. Notice that even though 73 is prime, it does not register in the count because a digit has not been changed.
Write a function that takes a number as input and determine the number of change-a-digit primes that can be found. Remember that only one digit at a time can be changed. Also, the numbers may not have leading zeros.

Solution Stats

10 Solutions

7 Solvers

Last Solution submitted on Apr 23, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...