2018-09-30 23:01:58 +01:00
---
id: 5900f3fe1000cf542c50ff11
title: 'Problem 146: Investigating a Prime Pattern'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301775
2021-01-13 03:31:00 +01:00
dashedName: problem-146-investigating-a-prime-pattern
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2021-07-14 13:05:12 +02:00
The smallest positive integer $n$ for which the numbers $n^2 + 1$, $n^2 + 3$, $n^2 + 7$, $n^2 + 9$, $n^2 + 13$, and $n^2 + 27$ are consecutive primes is 10. The sum of all such integers $n$ below one-million is 1242490.
2018-09-30 23:01:58 +01:00
2021-07-14 13:05:12 +02:00
What is the sum of all such integers $n$ below 150 million?
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-14 13:05:12 +02:00
`primePattern()` should return `676333270` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-14 13:05:12 +02:00
assert.strictEqual(primePattern(), 676333270);
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-14 13:05:12 +02:00
function primePattern() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-14 13:05:12 +02:00
primePattern();
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
```