freeCodeCamp/curriculum/challenges/spanish/08-coding-interview-prep/project-euler/problem-216-investigating-t...

62 lines
1.0 KiB
Markdown
Raw Normal View History

---
id: 5
localeTitle: 5900f4451000cf542c50ff57
challengeType: 5
title: 'Problem 216: Investigating the primality of numbers of the form 2n2-1'
---
## Description
<section id='description'>
Considere los números t (n) de la forma t (n) = 2n2-1 con n&gt; 1.
Los primeros números son 7, 17, 31, 49, 71, 97, 127 y 161.
Resulta que solo 49 = 7 * 7 y 161 = 7 * 23 no son primos.
Para n ≤ 10000 hay 2202 números t (n) que son primos.
¿Cuántos números t (n) son primos para n ≤ 50,000,000?
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler216()</code> debe devolver 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>