2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4d11000cf542c50ffe4
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 357: Prime generating integers'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
Consider the divisors of 30: 1,2,3,5,6,10,15,30.
|
|
|
|
It can be seen that for every divisor d of 30, d+30/d is prime.
|
|
|
|
|
|
|
|
|
|
|
|
Find the sum of all positive integers n not exceeding 100 000 000such that
|
|
|
|
for every divisor d of n, d+n/d is prime.
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler357()</code> should return 1739023853137.
|
2018-10-08 00:01:53 +00:00
|
|
|
testString: 'assert.strictEqual(euler357(), 1739023853137, "<code>euler357()</code> should return 1739023853137.");'
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler357() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler357();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|