2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f4571000cf542c50ff6a
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 235: An Arithmetic Geometric sequence'
|
2019-08-05 16:17:33 +00:00
|
|
|
forumTopicId: 301879
|
2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
Given is the arithmetic-geometric sequence u(k) = (900-3k)rk-1.
|
|
|
|
Let s(n) = Σk=1...nu(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.
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler235()</code> should return 1.002322108633.
|
2019-07-27 02:30:17 +00:00
|
|
|
testString: assert.strictEqual(euler235(), 1.002322108633);
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler235() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler235();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
2019-07-18 15:24:12 +00:00
|
|
|
|
2018-09-30 22:01:58 +00:00
|
|
|
</section>
|