文章目錄

原题链接http://projecteuler.net/problem=51

Prime digit replacements

By replacing the 1st digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime.

By replacing the 3rd and 4th digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten generated numbers, yielding the family: 56003, 56113, 56333, 56443, 56663, 56773, and 56993. Consequently 56003, being the first member of this family, is the smallest prime with this property.

Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family.

素数数字替换

通过替换两位数*3的第一位数字,我们得到9个数字中的6个是素数:13,23,43,53,73和83.

通过用同一数字替换数56**3的第3、4位,这个5位数是第一个数,使得替换之后的10个数中,有7个数是素数。这就形成一个家族,它们是:56003,56113,56333,56443,56773和56993。56003则是这个素数族的第一个成员,是具有这种性质的最小素数。

找出最小的素数,通过用相同的数字替换这个素数中的一部分数字(没有必要想邻),可以得到一个素数,这个素数是8素数族的一部分。

解答:

一时还想不出好的办法,先空着。

文章目錄