Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-337-totient-stairstep-sequences.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

53 lines
849 B
Markdown

---
id: 5900f4be1000cf542c50ffd0
title: 'Problem 337: Totient Stairstep Sequences'
challengeType: 5
forumTopicId: 301995
dashedName: problem-337-totient-stairstep-sequences
---
# --description--
Let {a1, a2,..., an} be an integer sequence of length n such that:
a1 = 6
for all 1 ≤ i &lt; n : φ(ai) &lt; φ(ai+1) &lt; ai &lt; ai+11
Let S(N) be the number of such sequences with an ≤ N.
For example, S(10) = 4: {6}, {6, 8}, {6, 8, 9} and {6, 10}.
We can verify that S(100) = 482073668 and S(10 000) mod 108 = 73808307.
Find S(20 000 000) mod 108.
1 φ denotes Euler's totient function.
# --hints--
`euler337()` should return 85068035.
```js
assert.strictEqual(euler337(), 85068035);
```
# --seed--
## --seed-contents--
```js
function euler337() {
return true;
}
euler337();
```
# --solutions--
```js
// solution required
```