Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-308-an-amazing-prime-generating-automaton.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

47 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4a11000cf542c50ffb3
title: 问题308惊人的生成素数的自动机
challengeType: 5
videoUrl: ''
dashedName: problem-308-an-amazing-prime-generating-automaton
---
# --description--
用编程语言Fractran编写的程序包含一个分数列表。
Fractran虚拟机的内部状态是一个正整数该整数最初设置为种子值。 Fractran程序的每次迭代都将状态整数乘以列表中的第一个分数从而将其保留为整数。
例如约翰·霍顿·康威John Horton Conway为黄金一代编写的Fractran程序之一由以下14个部分组成1791 7885 1951年 2338 2933 7729 9523 7719 117 1113 1311 152 17 551 。 从种子整数2开始程序的连续迭代产生以下序列 1582572519252275425...68430...136860...54432240...
此序列中出现的2的幂是22、23、25... 可以证明该序列中所有2的幂都具有质数指数并且所有质数都以正确的顺序显示为2的幂指数
如果有人使用上面的Fractran程序来解决Project Euler问题7找到第10001个素数那么在该程序产生第210001个素数之前将需要进行几次迭代
# --hints--
`euler308()`应该返回1539669807660924。
```js
assert.strictEqual(euler308(), 1539669807660924);
```
# --seed--
## --seed-contents--
```js
function euler308() {
return true;
}
euler308();
```
# --solutions--
```js
// solution required
```