2018-09-30 23:01:58 +01:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4491000cf542c50ff5c
|
|
|
|
|
challengeType: 5
|
|
|
|
|
title: 'Problem 221: Alexandrian Integers'
|
2019-08-05 09:17:33 -07:00
|
|
|
|
forumTopicId: 301864
|
2018-09-30 23:01:58 +01:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
<section id='description'>
|
|
|
|
|
|
2019-07-18 17:32:12 +02:00
|
|
|
|
We shall call a positive integer A an "Alexandrian integer", if there exist integers p, q, r such that:
|
|
|
|
|
A = p · q · r and 1/A = 1/p + 1/q + 1/r
|
|
|
|
|
<!-- TODO Use MathJax -->
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
|
|
For example, 630 is an Alexandrian integer (p = 5, q = −7, r = −18).
|
|
|
|
|
In fact, 630 is the 6th Alexandrian integer, the first 6 Alexandrian integers being: 6, 42, 120, 156, 420 and 630.
|
|
|
|
|
|
|
|
|
|
Find the 150000th Alexandrian integer.
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 14:37:37 +01:00
|
|
|
|
tests:
|
|
|
|
|
- text: <code>euler221()</code> should return 1884161251122450.
|
2019-07-26 19:26:37 -07:00
|
|
|
|
testString: assert.strictEqual(euler221(), 1884161251122450);
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler221() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler221();
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|
2019-07-18 08:24:12 -07:00
|
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
|
</section>
|