freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-443-gcd-sequence.md

32 lines
547 B
Markdown
Raw Normal View History

---
id: 5900f5271000cf542c51003a
title: 问题443GCD序列
challengeType: 5
videoUrl: ''
---
# --description--
设gn为如下定义的序列g4= 13gn= gn-1+ gcdngn-1n> 4。
前几个值是:
```
n4567891011121314151617181920... g(n)1314161718272829303132333451545560...
```
给出g1 000= 2524和g1 000 000= 2624152。
找到g1015
# --hints--
`euler443()`应该返回2744233049300770。
```js
assert.strictEqual(euler443(), 2744233049300770);
```
# --solutions--