fix(curriculum): clean-up Project Euler 301-320 (#42926)

* fix: clean-up Project Euler 301-320

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
gikf
2021-07-21 17:59:56 +02:00
committed by GitHub
parent c3eb8189af
commit 32dbe23f5e
20 changed files with 253 additions and 197 deletions

View File

@ -8,22 +8,22 @@ dashedName: problem-304-primonacci
# --description--
For any positive integer n the function next_prime(n) returns the smallest prime p such that p>n.
For any positive integer $n$ the function $\text{next_prime}(n)$ returns the smallest prime $p$ such that $p > n$.
The sequence a(n) is defined by: a(1)=next_prime(1014) and a(n)=next_prime(a(n-1)) for n>1.
The sequence $a(n)$ is defined by: $a(1) = \text{next_prime}({10}^{14})$ and $a(n) = \text{next_prime}(a(n - 1))$ for $n > 1$.
The fibonacci sequence f(n) is defined by: f(0)=0, f(1)=1 and f(n)=f(n-1)+f(n-2) for n>1.
The fibonacci sequence $f(n)$ is defined by: $f(0) = 0$, $f(1) = 1$ and $f(n) = f(n - 1) + f(n - 2)$ for $n > 1$.
The sequence b(n) is defined as f(a(n)).
The sequence $b(n)$ is defined as $f(a(n))$.
Find b(n) for 1≤n≤100 000. Give your answer mod 1234567891011.
Find $\sum b(n)$ for $1≤n≤100\\,000$. Give your answer $\bmod 1\\,234\\,567\\,891\\,011$.
# --hints--
`euler304()` should return 283988410192.
`primonacci()` should return `283988410192`.
```js
assert.strictEqual(euler304(), 283988410192);
assert.strictEqual(primonacci(), 283988410192);
```
# --seed--
@ -31,12 +31,12 @@ assert.strictEqual(euler304(), 283988410192);
## --seed-contents--
```js
function euler304() {
function primonacci() {
return true;
}
euler304();
primonacci();
```
# --solutions--