1.2 KiB
1.2 KiB
id | challengeType | title | forumTopicId |
---|---|---|---|
5900f45f1000cf542c50ff71 | 5 | Problem 242: Odd Triplets | 301889 |
Description
When all three values n, k and f(n,k) are odd, we say that they make an odd-triplet [n,k,f(n,k)].
There are exactly five odd-triplets with n ≤ 10, namely: [1,1,f(1,1) = 1], [5,1,f(5,1) = 3], [5,5,f(5,5) = 1], [9,1,f(9,1) = 5] and [9,9,f(9,9) = 1].
How many odd-triplets are there with n ≤ 1012 ?
Instructions
Tests
tests:
- text: <code>euler242()</code> should return 997104142249036700.
testString: assert.strictEqual(euler242(), 997104142249036700);
Challenge Seed
function euler242() {
return true;
}
euler242();
Solution
// solution required