65 lines
1.1 KiB
Markdown
65 lines
1.1 KiB
Markdown
![]() |
---
|
||
|
id: 5
|
||
|
localeTitle: 5900f52c1000cf542c51003e
|
||
|
challengeType: 5
|
||
|
title: 'Problem 447: Retractions C'
|
||
|
---
|
||
|
|
||
|
## Description
|
||
|
<section id='description'>
|
||
|
Para cada entero n> 1, la familia de funciones fn, a, b se define
|
||
|
por fn, a, b (x) ≡ax + b mod n para a, b, x entero y 0 <a<n, 0≤b<n, 0≤x<n.<code> 0 Llamaremos retracción de fn, a, ba si fn, a, b (fn, a, b (x)) ≡fn, a, b (x) mod n para cada 0≤x <n.<code> 0 Sea R (n) el número de retracciones para n.
|
||
|
|
||
|
|
||
|
F (N) = ∑R (n) para 2≤n≤N.
|
||
|
F (107) ≡638042271 (mod 1 000 000 007).
|
||
|
|
||
|
|
||
|
Encuentra F (1014) (mod 1 000 000 007).
|
||
|
</section>
|
||
|
|
||
|
## Instructions
|
||
|
<section id='instructions'>
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Tests
|
||
|
<section id='tests'>
|
||
|
|
||
|
```yml
|
||
|
tests:
|
||
|
- text: <code>euler447()</code> debe devolver 530553372.
|
||
|
testString: 'assert.strictEqual(euler447(), 530553372, "<code>euler447()</code> should return 530553372.");'
|
||
|
|
||
|
```
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Challenge Seed
|
||
|
<section id='challengeSeed'>
|
||
|
|
||
|
<div id='js-seed'>
|
||
|
|
||
|
```js
|
||
|
function euler447() {
|
||
|
// Good luck!
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
euler447();
|
||
|
```
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</section>
|
||
|
|
||
|
## Solution
|
||
|
<section id='solution'>
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|
||
|
</section>
|