文章目錄

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

Prime permutations

The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.

There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this property, but there is one other 4-digit increasing sequence.

What 12-digit number do you form by concatenating the three terms in this sequence?

素数排列
算术序列1487,4817,8147是按照3330递增的,它有两个平常的性质:(1)这三个数都是素数 (2)这三个4位数中的每一个都是另一个的排列

不存在1位,2位,3位具有这种性质的序列,但是还有另一个4位的具有这种性质的递增序列。

求将这个序列中的三个数链接起来得到的12位数

解答:
没什么好说的,先生成一个素数判别表,之后就简单了。

文章目錄