2018-09-30 23:01:58 +01:00
---
id: 5900f3ef1000cf542c50ff02
title: 'Problem 131: Prime cube partnership'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301759
2021-01-13 03:31:00 +01:00
dashedName: problem-131-prime-cube-partnership
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2021-07-16 21:38:37 +02:00
There are some prime values, $p$, for which there exists a positive integer, $n$, such that the expression $n^3 + n^{2}p$ is a perfect cube.
2020-11-27 19:02:05 +01:00
2021-07-16 21:38:37 +02:00
For example, when $p = 19,\\ 8^3 + 8^2 × 19 = {12}^3$.
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
What is perhaps most surprising is that the value of $n$ is unique for each prime with this property, and there are only four such primes below one hundred.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
How many primes below one million have this remarkable property?
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
`primeCubePartnership()` should return `173` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-16 21:38:37 +02:00
assert.strictEqual(primeCubePartnership(), 173);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
2021-07-16 21:38:37 +02:00
function primeCubePartnership() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-16 21:38:37 +02:00
primeCubePartnership();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```