freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-304-primonacci.russ...

58 lines
1.4 KiB
Markdown
Raw Normal View History

---
id: 5900f49d1000cf542c50ffaf
challengeType: 5
title: 'Problem 304: Primonacci'
forumTopicId: 301958
localeTitle: 'Выпуск 304: Примоначчи'
---
## Description
<section id='description'>
Для любого натурального n функция next_prime (n) возвращает наименьшее простое число p такое, что p&gt; n. <p> Последовательность a (n) определяется: a (1) = next_prime (1014) и a (n) = next_prime (a (n-1)) для n&gt; 1. </p><p> Последовательность фибоначчи f (n) определяется следующим образом: f (0) = 0, f (1) = 1 и f (n) = f (n-1) + f (n-2) при n&gt; 1. </p><p> Последовательность b (n) определяется как f (a (n)). </p><p> Найдите Σb (n) для 1≤n≤100 000. Дайте свой ответ mod 1234567891011. </p>
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler304()</code> should return 283988410192.
testString: assert.strictEqual(euler304(), 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>