Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.md
gikf 5a52c229f5 fix(curriculum): clean-up Project Euler 181-200 (#42819)
* fix: clean-up Project Euler 181-200

* fix: corrections from review

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

* fix: missing delimiter

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

41 lines
876 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4311000cf542c50ff44
title: 'Problem 197: Investigating the behaviour of a recursively defined sequence'
challengeType: 5
forumTopicId: 301835
dashedName: problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence
---
# --description--
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)$.
Find $u_n + u_{n + 1}$ for $n = {10}^{12}$. Give your answer with 9 digits after the decimal point.
# --hints--
`recursivelyDefinedSequence()` should return `1.710637717`.
```js
assert.strictEqual(recursivelyDefinedSequence(), 1.710637717);
```
# --seed--
## --seed-contents--
```js
function recursivelyDefinedSequence() {
return true;
}
recursivelyDefinedSequence();
```
# --solutions--
```js
// solution required
```