* fix: clean-up Project Euler 441-460 * fix: corrections from review Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
1013 B
1013 B
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5900f5261000cf542c510038 | Problem 441: The inverse summation of coprime couples | 5 | 302113 | problem-441-the-inverse-summation-of-coprime-couples |
--description--
For an integer M, we define R(M) as the sum of \frac{1}{p·q} for all the integer pairs p and q which satisfy all of these conditions:
1 ≤ p < q ≤ Mp + q ≥ Mpandqare coprime.
We also define S(N) as the sum of R(i) for 2 ≤ i ≤ N.
We can verify that S(2) = R(2) = \frac{1}{2}, S(10) ≈ 6.9147 and S(100) ≈ 58.2962.
Find S({10}^7). Give your answer rounded to four decimal places.
--hints--
inverseSummationCoprimeCouples() should return 5000088.8395.
assert.strictEqual(inverseSummationCoprimeCouples(), 5000088.8395);
--seed--
--seed-contents--
function inverseSummationCoprimeCouples() {
return true;
}
inverseSummationCoprimeCouples();
--solutions--
// solution required