2021-06-15 00:49:18 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5900f51e1000cf542c510030
|
2021-11-29 08:32:04 -08:00
|
|
|
|
title: 'Problema 432: Soma de totientes'
|
2021-06-15 00:49:18 -07:00
|
|
|
|
challengeType: 5
|
|
|
|
|
forumTopicId: 302103
|
|
|
|
|
dashedName: problem-432-totient-sum
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2021-11-29 08:32:04 -08:00
|
|
|
|
Considere $S(n, m) = \sum φ(n × i)$ para $1 ≤ i ≤ m$. ($φ$ é a função totiente de Euler)
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2021-11-29 08:32:04 -08:00
|
|
|
|
Você é informado de que $S(510.510,{10}^6) = 45.480.596.821.125.120$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2021-11-29 08:32:04 -08:00
|
|
|
|
Encontre $S(510.510, {10}^{11})$. Dê os últimos 9 algarismos da sua resposta.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2021-11-29 08:32:04 -08:00
|
|
|
|
`totientSum()` deve retornar `754862080`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
```js
|
2021-11-29 08:32:04 -08:00
|
|
|
|
assert.strictEqual(totientSum(), 754862080);
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
2021-11-29 08:32:04 -08:00
|
|
|
|
function totientSum() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-29 08:32:04 -08:00
|
|
|
|
totientSum();
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|