freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-463-a-weird-recurre...

56 lines
1.1 KiB
Markdown
Raw Normal View History

---
id: 5900f53c1000cf542c51004e
challengeType: 5
title: 'Problem 463: A weird recurrence relation'
videoUrl: ''
localeTitle: 'Problema 463: Uma estranha relação de recorrência'
---
## Description
<section id="description"> A função $ f $ é definida para todos os inteiros positivos da seguinte forma: $ 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) $ <p> A função $ S (n) $ é definida como $ \ sum_ {i = 1} ^ {n} f (i) $. $ S (8) = 22 $ e $ S (100) = 3604 $. Encontre $ S (3 ^ {37}) $. Dê os últimos 9 dígitos da sua resposta. </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler463()</code> deve retornar 808981553.
testString: 'assert.strictEqual(euler463(), 808981553, "<code>euler463()</code> should return 808981553.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler463() {
// Good luck!
return true;
}
euler463();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>