2021-06-15 00:49:18 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5900f51e1000cf542c510030
|
2022-03-04 19:46:29 +05:30
|
|
|
|
title: 'Problema 432: Somma di tozienti'
|
2021-06-15 00:49:18 -07:00
|
|
|
|
challengeType: 5
|
|
|
|
|
forumTopicId: 302103
|
|
|
|
|
dashedName: problem-432-totient-sum
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Sia $S(n, m) = \sum φ(n × i)$ per $1 ≤ i ≤ m$. ($φ$ è la funzione toziente di Eulero)
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Ti è dato che $S(510\\,510, {10}^6) = 45\\,480\\,596\\,821\\,125\\,120$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Trova $S(510\\,510, {10}^{11})$. Dai le ultime 9 cifre della tua risposta.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
`totientSum()` dovrebbe restituire `754862080`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
```js
|
2022-03-04 19:46:29 +05:30
|
|
|
|
assert.strictEqual(totientSum(), 754862080);
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
2022-03-04 19:46:29 +05:30
|
|
|
|
function totientSum() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
totientSum();
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|