freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-197-investigating-t...

876 B
Raw Blame History

id title challengeType forumTopicId dashedName
5900f4311000cf542c50ff44 Problem 197: Investigating the behaviour of a recursively defined sequence 5 301835 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.

assert.strictEqual(recursivelyDefinedSequence(), 1.710637717);

--seed--

--seed-contents--

function recursivelyDefinedSequence() {

  return true;
}

recursivelyDefinedSequence();

--solutions--

// solution required