2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4d61000cf542c50ffe9
|
|
|
|
|
title: 'Problem 362: Squarefree factors'
|
2020-11-27 18:02:05 +00:00
|
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
|
forumTopicId: 302023
|
2021-01-13 02:31:00 +00:00
|
|
|
|
dashedName: problem-362-squarefree-factors
|
2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --description--
|
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
Consider the number 54.
|
2020-11-27 18:02:05 +00:00
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
54 can be factored in 7 distinct ways into one or more factors larger than 1:
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
54, 2×27, 3×18, 6×9, 3×3×6, 2×3×9 and 2×3×3×3.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
If we require that the factors are all squarefree only two ways remain: 3×3×6 and 2×3×3×3.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
Let's call Fsf(n) the number of ways n can be factored into one or more squarefree factors larger than 1, so Fsf(54)=2.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
Let S(n) be ∑Fsf(k) for k=2 to n.
|
|
|
|
|
|
|
|
|
|
S(100)=193.
|
|
|
|
|
|
|
|
|
|
Find S(10 000 000 000).
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --hints--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
`euler362()` should return 457895958010.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
```js
|
|
|
|
|
assert.strictEqual(euler362(), 457895958010);
|
2018-09-30 22:01:58 +00:00
|
|
|
|
```
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --seed--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
## --seed-contents--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler362() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler362();
|
|
|
|
|
```
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --solutions--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|