2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4e81000cf542c50fffa
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 379: Least common multiple count'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
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-10-08 00:01:53 +00:00
|
|
|
Let g be the summatory function of f, i.e.:
|
2018-09-30 22:01:58 +00:00
|
|
|
g(n) = ∑ f(i) for 1 ≤ i ≤ n.
|
|
|
|
|
|
|
|
|
|
|
|
You are given that g(106) = 37429395.
|
|
|
|
|
|
|
|
|
|
|
|
Find g(1012).
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler379()</code> should return 132314136838185.
|
2018-10-08 00:01:53 +00:00
|
|
|
testString: 'assert.strictEqual(euler379(), 132314136838185, "<code>euler379()</code> should return 132314136838185.");'
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler379() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler379();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|