2018-09-30 23:01:58 +01:00
|
|
|
|
---
|
|
|
|
|
id: 5900f5131000cf542c510024
|
|
|
|
|
title: 'Problem 421: Prime factors of n15+1'
|
2020-11-27 19:02:05 +01:00
|
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
|
forumTopicId: 302091
|
2021-01-13 03:31:00 +01:00
|
|
|
|
dashedName: problem-421-prime-factors-of-n151
|
2018-09-30 23:01:58 +01:00
|
|
|
|
---
|
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
# --description--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
Numbers of the form n15+1 are composite for every integer n > 1.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
For positive integers n and m let s(n,m) be defined as the sum of the distinct prime factors of n15+1 not exceeding m.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
E.g. 215+1 = 3×3×11×331. So s(2,10) = 3 and s(2,1000) = 3+11+331 = 345.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
Also 1015+1 = 7×11×13×211×241×2161×9091. So s(10,100) = 31 and s(10,1000) = 483. Find ∑ s(n,108) for 1 ≤ n ≤ 1011.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
# --hints--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
`euler421()` should return 2304215802083466200.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
```js
|
|
|
|
|
assert.strictEqual(euler421(), 2304215802083466200);
|
2018-09-30 23:01:58 +01:00
|
|
|
|
```
|
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
# --seed--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
## --seed-contents--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler421() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler421();
|
|
|
|
|
```
|
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
|
# --solutions--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|