2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
id: 5900f4571000cf542c50ff6a
|
|
|
|
title: 'Problem 235: An Arithmetic Geometric sequence'
|
2020-11-27 19:02:05 +01:00
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
forumTopicId: 301879
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-235-an-arithmetic-geometric-sequence
|
2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --description--
|
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
Given is the arithmetic-geometric sequence u(k) = (900-3k)rk-1.
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
Let s(n) = Σk=1...nu(k).
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
Find the value of r for which s(5000) = -600,000,000,000.
|
|
|
|
|
|
|
|
Give your answer rounded to 12 places behind the decimal point.
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --hints--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
`euler235()` should return 1.002322108633.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
|
|
|
assert.strictEqual(euler235(), 1.002322108633);
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --seed--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
## --seed-contents--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
function euler235() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler235();
|
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --solutions--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|