2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
id: 5900f4e81000cf542c50fffa
|
|
|
|
title: 'Problem 379: Least common multiple count'
|
2020-11-27 19:02:05 +01:00
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
forumTopicId: 302041
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-379-least-common-multiple-count
|
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-29 21:48:17 +02:00
|
|
|
Let $f(n)$ be the number of couples ($x$, $y$) with $x$ and $y$ positive integers, $x ≤ y$ and the least common multiple of $x$ and $y$ equal to $n$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 21:48:17 +02:00
|
|
|
Let $g$ be the summatory function of $f$, i.e.: $g(n) = \sum f(i)$ for $1 ≤ i ≤ n$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 21:48:17 +02:00
|
|
|
You are given that $g({10}^6) = 37\\,429\\,395$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-29 21:48:17 +02:00
|
|
|
Find $g({10}^{12})$.
|
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-29 21:48:17 +02:00
|
|
|
`leastCommonMultipleCount()` should return `132314136838185`.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
2021-07-29 21:48:17 +02:00
|
|
|
assert.strictEqual(leastCommonMultipleCount(), 132314136838185);
|
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-29 21:48:17 +02:00
|
|
|
function leastCommonMultipleCount() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-29 21:48:17 +02:00
|
|
|
leastCommonMultipleCount();
|
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
|
|
|
|
```
|