Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.md
gikf a9418a1fe9 fix(curriculum): clean-up Project Euler 221-240 (#42839)
* fix: clean-up Project Euler 221-240

* fix: corrections from review

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>

Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2021-07-15 14:26:34 +02:00

795 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f4571000cf542c50ff6a Problem 235: An Arithmetic Geometric sequence 5 301879 problem-235-an-arithmetic-geometric-sequence

--description--

Given is the arithmetic-geometric sequence u(k) = (900 - 3k)r^{k - 1}.

Let s(n) = \sum_{k=1 \ldots n} u(k).

Find the value of r for which s(5000) = -600\\,000\\,000\\,000.

Give your answer rounded to 12 places behind the decimal point.

--hints--

arithmeticGeometricSequence() should return 1.002322108633.

assert.strictEqual(arithmeticGeometricSequence(), 1.002322108633);

--seed--

--seed-contents--

function arithmeticGeometricSequence() {

  return true;
}

arithmeticGeometricSequence();

--solutions--

// solution required