2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f5131000cf542c510024
|
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2020-10-01 15:54:21 +00:00
|
|
|
|
title: 问题421:n15 +1的素因子
|
2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
2020-02-17 16:40:55 +00:00
|
|
|
|
<section id="description">
|
|
|
|
|
对于n> 1的每个整数,n15 +1形式的数字是合成的。
|
|
|
|
|
对于正整数n和m,将s(n,m)定义为不超过m的n15 +1个不同素数因子的总和。
|
|
|
|
|
|
|
|
|
|
例如 215 + 1 = 3×3×11×331。
|
|
|
|
|
因此s(2.10)= 3且s(2,1000)= 3 + 11 + 331 = 345。
|
|
|
|
|
|
|
|
|
|
同样是1015 +1 = 7×11×13×211×241×2161×9091。
|
|
|
|
|
因此s(10,100)= 31,而s(10,1000)= 483。
|
|
|
|
|
求出∑ s(n,108)为1≤n≤1011。
|
|
|
|
|
</section>
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
## Instructions
|
2020-02-17 16:40:55 +00:00
|
|
|
|
<section id="instructions">
|
|
|
|
|
</section>
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
tests:
|
2020-02-17 16:40:55 +00:00
|
|
|
|
- text: <code>euler421()</code>应该返回2304215802083466200。
|
|
|
|
|
testString: assert.strictEqual(euler421(), 2304215802083466200);
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler421() {
|
|
|
|
|
// Good luck!
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler421();
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|
2020-08-13 15:24:35 +00:00
|
|
|
|
|
|
|
|
|
/section>
|