2021-06-15 00:49:18 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4c31000cf542c50ffd5
|
2022-03-02 20:56:06 +05:30
|
|
|
|
title: 'Problema 342: Il toziente di un quadrato è un cubo'
|
2021-06-15 00:49:18 -07:00
|
|
|
|
challengeType: 5
|
|
|
|
|
forumTopicId: 302001
|
|
|
|
|
dashedName: problem-342-the-totient-of-a-square-is-a-cube
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2022-03-02 20:56:06 +05:30
|
|
|
|
Considera il numero 50.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-02 20:56:06 +05:30
|
|
|
|
${50}^2 = 2500 = 2^2 × 5^4$, so $φ(2500) = 2 × 4 × 5^3 = 8 × 5^3 = 2^3 × 5^3$. $φ$ denota la funzione toziente di Eulero.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-02 20:56:06 +05:30
|
|
|
|
Quindi 2500 è un quadrato e $φ(2500)$ è un cubo.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-02 20:56:06 +05:30
|
|
|
|
Trova la somma di tutti i numeri $n$, $1 < n < {10}^{10}$ in modo che $φ(n^2)$ sia un cubo.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2022-03-02 20:56:06 +05:30
|
|
|
|
`totientOfSquare()` dovrebbe restituire `5943040885644`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
```js
|
2022-03-02 20:56:06 +05:30
|
|
|
|
assert.strictEqual(totientOfSquare(), 5943040885644);
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
2022-03-02 20:56:06 +05:30
|
|
|
|
function totientOfSquare() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-02 20:56:06 +05:30
|
|
|
|
totientOfSquare();
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|