鱼C论坛

 找回密码
 立即注册
查看: 2202|回复: 0

题目196:三生质数

[复制链接]
发表于 2016-11-4 23:25:17 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
Prime triplets

Build a triangle from all positive integers in the following way:

屏幕快照 2016-11-04 下午11.21.30.png


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.

Find  S(5678027) + S(7208785).



题目:

如果把所有的正整数以下面的方式排成三角形:

屏幕快照 2016-11-04 下午11.21.30.png


每个正整数最多有 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) 的值。

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-1 16:16

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表