freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-293-pseudo-fortunat...

30 lines
815 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f4931000cf542c50ffa4
title: 问题293伪幸运数
challengeType: 5
videoUrl: ''
---
# --description--
如果偶数正整数N是2的幂或它的不同质数因子是连续质数则称该数为偶数。
前十二个允许的数字是2,4,6,8,12,16,18,24,30,32,36,48。
如果允许N则最小的整数M> 1使得N + M为质数将被称为N的伪幸运数。
例如N = 630是可接受的因为它是偶数并且其不同的素数因子是连续的素数2,3,5和7。 631之后的下一个质数是641 因此630的伪幸运数为M = 11。 还可以看到16的伪幸运数字是3。
找到所有小于109的允许数字N的所有唯一伪幸运数字之和。
# --hints--
`euler293()`应该返回2209。
```js
assert.strictEqual(euler293(), 2209);
```
# --solutions--