Files
freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-241-perfection-quotients.english.md

64 lines
1.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f45d1000cf542c50ff70
challengeType: 5
title: 'Problem 241: Perfection Quotients'
---
## Description
<section id='description'>
For a positive integer n, let σ(n) be the sum of all divisors of n, so e.g. σ(6) = 1 + 2 + 3 + 6 = 12.
A perfect number, as you probably know, is a number with σ(n) = 2n.
Let us define the perfection quotient of a positive integer asp(n)= 
σ(n)n
.
Find the sum of all positive integers n ≤ 1018 for which p(n) has the form k + 12, where k is an integer.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler241()</code> should return 482316491800641150.
testString: 'assert.strictEqual(euler241(), 482316491800641150, "<code>euler241()</code> should return 482316491800641150.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler241() {
// Good luck!
return true;
}
euler241();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>