1.3 KiB
1.3 KiB
id | challengeType | title |
---|---|---|
5900f5181000cf542c51002a | 5 | Problem 427: n-sequences |
Description
For any sequence S, let L(S) be the length of the longest contiguous subsequence of S with the same value. For example, for the given sequence S above, L(S) = 3, because of the three consecutive 7's.
Let f(n) = ∑ L(S) for all n-sequences S.
For example, f(3) = 45, f(7) = 1403689 and f(11) = 481496895121.
Find f(7 500 000) mod 1 000 000 009.
Instructions
Tests
tests:
- text: <code>euler427()</code> should return 97138867.
testString: assert.strictEqual(euler427(), 97138867, '<code>euler427()</code> should return 97138867.');
Challenge Seed
function euler427() {
// Good luck!
return true;
}
euler427();
Solution
// solution required