Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-443-gcd-sequence.md
Oliver Eyton-Williams 0bd52f8bd1 Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
2020-11-27 10:02:05 -08:00

704 B

id, title, challengeType, forumTopicId
id title challengeType forumTopicId
5900f5271000cf542c51003a Problem 443: GCD sequence 5 302115

--description--

Let g(n) be a sequence defined as follows: g(4) = 13, g(n) = g(n-1) + gcd(n, g(n-1)) for n > 4.

The first few values are:

n 4567891011121314151617181920... g(n) 1314161718272829303132333451545560...

You are given that g(1 000) = 2524 and g(1 000 000) = 2624152.

Find g(1015).

--hints--

euler443() should return 2744233049300770.

assert.strictEqual(euler443(), 2744233049300770);

--seed--

--seed-contents--

function euler443() {

  return true;
}

euler443();

--solutions--

// solution required