2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
id: 5900f5261000cf542c510038
|
|
|
|
title: 'Problem 441: The inverse summation of coprime couples'
|
2020-11-27 19:02:05 +01:00
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
forumTopicId: 302113
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-441-the-inverse-summation-of-coprime-couples
|
2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --description--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-30 17:20:31 +02:00
|
|
|
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:
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-30 17:20:31 +02:00
|
|
|
- $1 ≤ p < q ≤ M$
|
|
|
|
- $p + q ≥ M$
|
|
|
|
- $p$ and $q$ are coprime.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-30 17:20:31 +02:00
|
|
|
We also define $S(N)$ as the sum of $R(i)$ for $2 ≤ i ≤ N$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-30 17:20:31 +02:00
|
|
|
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.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --hints--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-30 17:20:31 +02:00
|
|
|
`inverseSummationCoprimeCouples()` should return `5000088.8395`.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
2021-07-30 17:20:31 +02:00
|
|
|
assert.strictEqual(inverseSummationCoprimeCouples(), 5000088.8395);
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --seed--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
## --seed-contents--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
2021-07-30 17:20:31 +02:00
|
|
|
function inverseSummationCoprimeCouples() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-30 17:20:31 +02:00
|
|
|
inverseSummationCoprimeCouples();
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --solutions--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|