56 lines
1.1 KiB
Markdown
56 lines
1.1 KiB
Markdown
---
|
||
id: 5900f4451000cf542c50ff57
|
||
challengeType: 5
|
||
title: 'Problem 216: Investigating the primality of numbers of the form 2n2-1'
|
||
videoUrl: ''
|
||
localeTitle: 问题216:调查2n2-1形式的数字的素数
|
||
---
|
||
|
||
## Description
|
||
<section id="description">考虑形式为t(n)= 2n2-1的数字t(n),其中n> 1.第一个这样的数字是7,17,31,49,71,97,127和161.事实证明只有49 = 7 * 7和161 = 7 * 23不是素数。对于n≤10000,有2202个数字t(n)是素数。 <p>对于n≤50,000,000,有多少个数t(n)是素数? </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler216()</code>应该返回5437849。
|
||
testString: 'assert.strictEqual(euler216(), 5437849, "<code>euler216()</code> should return 5437849.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler216() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler216();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|