56 lines
1.2 KiB
Markdown
56 lines
1.2 KiB
Markdown
|
---
|
||
|
id: 5900f49d1000cf542c50ffaf
|
||
|
challengeType: 5
|
||
|
title: 'Problem 304: Primonacci'
|
||
|
videoUrl: ''
|
||
|
localeTitle: 'Questão 304: Primonacci'
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id="description"> Para qualquer inteiro positivo n, a função next_prime (n) retorna o menor número primo p tal que p> n. <p> A sequência a (n) é definida por: a (1) = next_prime (1014) e a (n) = next_prime (a (n-1)) para n> 1. </p><p> A seqüência de fibonacci f (n) é definida por: f (0) = 0, f (1) = 1 e f (n) = f (n-1) + f (n-2) para n> 1. </p><p> A seqüência b (n) é definida como f (a (n)). </p><p> Encontre ∑b (n) para 1≤n≤100 000. Dê a sua resposta mod 1234567891011. </p></section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id="instructions">
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler304()</code> deve retornar 283988410192.
|
||
|
testString: 'assert.strictEqual(euler304(), 283988410192, "<code>euler304()</code> should return 283988410192.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler304() {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler304();
|
||
|
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|