2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f45d1000cf542c50ff70
|
|
|
|
|
title: 'Problem 241: Perfection Quotients'
|
2020-11-27 18:02:05 +00:00
|
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
|
forumTopicId: 301888
|
2021-01-13 02:31:00 +00:00
|
|
|
|
dashedName: problem-241-perfection-quotients
|
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
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
|
For a positive integer $n$, let $σ(n)$ be the sum of all divisors of $n$, so e.g. $σ(6) = 1 + 2 + 3 + 6 = 12$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
|
A perfect number, as you probably know, is a number with $σ(n) = 2n$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
|
Let us define the perfection quotient of a positive integer as $p(n) = \frac{σ(n)}{n}$.
|
|
|
|
|
|
|
|
|
|
Find the sum of all positive integers $n ≤ {10}^{18}$ for which $p(n)$ has the form $k + \frac{1}{2}$, where $k$ is an integer.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --hints--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
|
`perfectionQuotients()` should return `482316491800641150`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
```js
|
2021-07-16 10:21:45 +00:00
|
|
|
|
assert.strictEqual(perfectionQuotients(), 482316491800641150);
|
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
|
2021-07-16 10:21:45 +00:00
|
|
|
|
function perfectionQuotients() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-16 10:21:45 +00:00
|
|
|
|
perfectionQuotients();
|
2018-09-30 22:01:58 +00:00
|
|
|
|
```
|
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
# --solutions--
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|