题目196:三生质数
Prime tripletsBuild a triangle from all positive integers in the following way:
Each positive integer has up to eight neighbours in the triangle.
A set of three primes is called a prime triplet if one of the three primes has the other two as neighbours in the triangle.
For example, in the second row, the prime numbers 2 and 3 are elements of some prime triplet.
If row 8 is considered, it contains two primes which are elements of some prime triplet, i.e. 29 and 31.
If row 9 is considered, it contains only one prime which is an element of some prime triplet: 37.
Define S(n) as the sum of the primes in row n which are elements of any prime triplet.
Then S(8)=60 and S(9)=37.
You are given that S(10000)=950007619.
FindS(5678027) + S(7208785).
题目:
如果把所有的正整数以下面的方式排成三角形:
每个正整数最多有 8 个相邻的数字。
如果某个质数在这个三角形中有两个相邻的质数,那么这三个质数的集合叫做三生质数。
比如,在第 2 行中,2 和 3 就是某个三生质数的元素。
如果是第 8 行中,29 和 31 是某个三生质数的元素。
而第 8 行中,只有 37 是某个三生质数的元素。
定义 S(n) 为第 N 行中所有能作为三生质数之一的质数之和。则 S(8)=60, S(9)=37。
现在已知 S(10000)=950007619。
请给出 S(5678027) + S(7208785) 的值。
页:
[1]