Files
freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-214-totient-chains.chinese.md
Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* fix: Chinese test suite

Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working.

* fix: ran script, updated testStrings and solutions
2020-03-03 18:49:47 +05:30

1.2 KiB
Raw Blame History

id, challengeType, title, videoUrl, localeTitle
id challengeType title videoUrl localeTitle
5900f4421000cf542c50ff55 5 Problem 214: Totient Chains 问题214个欧拉链

Description

设φ是欧拉的函数即对于自然数nφn是k的数1≤k≤ngcdkn= 1。

通过迭代φ每个正整数产生以1结尾的数字递减的链。例如如果我们从5开始则生成序列5,4,2,1。以下列出了长度为4的所有链条

5,4,2,1 7,6,2,1 8,4,2,1 9,6,2,1 10,4,2,1 12,4,2,1 14,6,2,1 18 6,2,1

这些链中只有两个以素数开头它们的总和为12。

所有小于40000000的素数的总和是多少它产生一个长度为25的链

Instructions

Tests

tests:
  - text: <code>euler214()</code>应该返回1677366278943。
    testString: assert.strictEqual(euler214(), 1677366278943);

Challenge Seed

function euler214() {
  // Good luck!
  return true;
}

euler214();

Solution

// solution required