Files
freeCodeCamp/curriculum/challenges/japanese/10-coding-interview-prep/project-euler/problem-146-investigating-a-prime-pattern.md

41 lines
804 B
Markdown
Raw Permalink Normal View History

---
id: 5900f3fe1000cf542c50ff11
title: '問題 146: 素数パターンを調べ上げる'
challengeType: 5
forumTopicId: 301775
dashedName: problem-146-investigating-a-prime-pattern
---
# --description--
$n^2 + 1$, $n^2 + 3$, $n^2 + 7$, $n^2 + 9$, $n^2 + 13$, $n^2 + 27$ が連続する素数になるような最小の正の整数 $n$ は 10 です。 100 万未満のそのような整数 $n$ の総和は 1242490 です。
1 億 5000 万未満のそのような整数 $n$ の総和を求めなさい。
# --hints--
`primePattern()``676333270` を返す必要があります。
```js
assert.strictEqual(primePattern(), 676333270);
```
# --seed--
## --seed-contents--
```js
function primePattern() {
return true;
}
primePattern();
```
# --solutions--
```js
// solution required
```