2018-09-30 22:01:58 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f48f1000cf542c50ffa2
|
|
|
|
|
title: 'Problem 291: Panaitopol Primes'
|
2020-11-27 18:02:05 +00:00
|
|
|
|
challengeType: 5
|
2019-08-05 16:17:33 +00:00
|
|
|
|
forumTopicId: 301943
|
2021-01-13 02:31:00 +00:00
|
|
|
|
dashedName: problem-291-panaitopol-primes
|
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-22 03:38:46 +00:00
|
|
|
|
A prime number $p$ is called a Panaitopol prime if $p = \frac{x^4 - y^4}{x^3 + y^3}$ for some positive integers $x$ and $y$.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2021-07-22 03:38:46 +00:00
|
|
|
|
Find how many Panaitopol primes are less than $5 × {10}^{15}$.
|
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-22 03:38:46 +00:00
|
|
|
|
`panaitopolPrimes()` should return `4037526`.
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
2020-11-27 18:02:05 +00:00
|
|
|
|
```js
|
2021-07-22 03:38:46 +00:00
|
|
|
|
assert.strictEqual(panaitopolPrimes(), 4037526);
|
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-22 03:38:46 +00:00
|
|
|
|
function panaitopolPrimes() {
|
2020-09-15 16:57:40 +00:00
|
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-22 03:38:46 +00:00
|
|
|
|
panaitopolPrimes();
|
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
|
|
|
|
|
```
|