Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-463-a-weird-recurrence-relation.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

758 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f53c1000cf542c51004e Problem 463: A weird recurrence relation 5 302138 problem-463-a-weird-recurrence-relation

--description--

The function f is defined for all positive integers as follows:

f(1)=1

f(3)=3

f(2n)=f(n)

f(4n + 1)=2f(2n + 1) - f(n)

f(4n + 3)=3f(2n + 1) - 2f(n)

The function S(n) is defined as \\sum\_{i=1}^{n}f(i). S(8)=22 and S(100)=3604. Find S(3^{37}). Give the last 9 digits of your answer.

--hints--

euler463() should return 808981553.

assert.strictEqual(euler463(), 808981553);

--seed--

--seed-contents--

function euler463() {

  return true;
}

euler463();

--solutions--

// solution required