* 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>
1.5 KiB
1.5 KiB
id, title, challengeType, videoUrl, dashedName
id | title | challengeType | videoUrl | dashedName |
---|---|---|---|---|
5900f4a11000cf542c50ffb3 | 问题308:惊人的生成素数的自动机 | 5 | 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开始,程序的连续迭代产生以下序列: 15,825,725,1925,2275,425,...,68,4,30,...,136,8,60,...,544,32,240,...
此序列中出现的2的幂是22、23、25,... 可以证明,该序列中所有2的幂都具有质数指数,并且所有质数都以正确的顺序显示为2的幂指数!
如果有人使用上面的Fractran程序来解决Project Euler问题7(找到第10001个素数),那么在该程序产生第210001个素数之前,将需要进行几次迭代?
--hints--
euler308()
应该返回1539669807660924。
assert.strictEqual(euler308(), 1539669807660924);
--seed--
--seed-contents--
function euler308() {
return true;
}
euler308();
--solutions--
// solution required