Back to Freecodecamp

Problem 221: Alexandrian Integers

curriculum/challenges/english/blocks/project-euler-problems-201-to-300/5900f4491000cf542c50ff5c.md

latest772 B
Original Source

--description--

We shall call a positive integer $A$ an "Alexandrian integer", if there exist integers $p$, $q$, $r$ such that:

$$A = p \times q \times r$$

and

$$\frac{1}{A} = \frac{1}{p} + \frac{1}{q} + \frac{1}{r}$$

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.

--hints--

alexandrianIntegers() should return 1884161251122450.

js
assert.strictEqual(alexandrianIntegers(), 1884161251122450);

--seed--

--seed-contents--

js
function alexandrianIntegers() {

  return true;
}

alexandrianIntegers();

--solutions--

js
// solution required