2018-09-30 22:01:58 +00:00
---
id: 5900f4311000cf542c50ff44
title: 'Problem 197: Investigating the behaviour of a recursively defined sequence'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301835
2021-01-13 02:31:00 +00:00
dashedName: problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Given is the function $f(x) = ⌊{2}^{30.403243784 - x^2}⌋ × {10}^{-9}$ ( ⌊ ⌋ is the floor-function), the sequence $u_n$ is defined by $u_0 = -1$ and $u_{n + 1} = f(u_n)$.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Find $u_n + u_{n + 1}$ for $n = {10}^{12}$. Give your answer with 9 digits after the decimal point.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
`recursivelyDefinedSequence()` should return `1.710637717` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-15 13:52:14 +00:00
assert.strictEqual(recursivelyDefinedSequence(), 1.710637717);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
2021-07-15 13:52:14 +00:00
function recursivelyDefinedSequence() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-15 13:52:14 +00:00
recursivelyDefinedSequence();
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```