freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-304-primonacci.md

47 lines
840 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f49d1000cf542c50ffaf
title: 问题304Primonacci
challengeType: 5
videoUrl: ''
dashedName: problem-304-primonacci
---
# --description--
对于任何正整数n函数next_primen返回最小质数p使得p> n。
序列an定义为 对于n> 1a1= next_prime1014和an= next_primean-1
斐波那契数列fn定义为 对于n> 1f0= 0f1= 1和fn= fn-1+ fn-2
序列bn定义为fan
求出∑bn为1≤n≤100000。 给出答案mod 1234567891011。
# --hints--
`euler304()`应该返回283988410192。
```js
assert.strictEqual(euler304(), 283988410192);
```
# --seed--
## --seed-contents--
```js
function euler304() {
return true;
}
euler304();
```
# --solutions--
```js
// solution required
```