1.1 KiB
1.1 KiB
id | challengeType | title |
---|---|---|
5900f49d1000cf542c50ffaf | 5 | Problem 304: Primonacci |
Description
The sequence a(n) is defined by: a(1)=next_prime(1014) and a(n)=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 sequence b(n) is defined as f(a(n)).
Find ∑b(n) for 1≤n≤100 000. Give your answer mod 1234567891011.
Instructions
Tests
tests:
- text: <code>euler304()</code> should return 283988410192.
testString: assert.strictEqual(euler304(), 283988410192, '<code>euler304()</code> should return 283988410192.');
Challenge Seed
function euler304() {
// Good luck!
return true;
}
euler304();
Solution
// solution required