2021-06-15 00:49:18 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5900f4c31000cf542c50ffd5
|
2021-11-22 09:25:21 -08:00
|
|
|
|
title: 'Problema 342: O totiente de um quadrado é um 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--
|
|
|
|
|
|
2021-11-22 09:25:21 -08:00
|
|
|
|
Considere o número 50.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2021-11-22 09:25:21 -08:00
|
|
|
|
${50}^2 = 2500 = 2^2 × 5^4$, então $φ(2500) = 2 × 4 × 5^3 = 8 × 5^3 = 2^3 × 5^3$. $φ$ é a função totiente de Euler.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2021-11-22 09:25:21 -08:00
|
|
|
|
Portanto, 2500 é um quadrado e $φ(2500)$ é um cubo.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2021-11-22 09:25:21 -08:00
|
|
|
|
Encontre a soma de todos os números $n$, $1 < n < {10}^{10}$, tal que $φ(n^2)$ é um cubo.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2021-11-22 09:25:21 -08:00
|
|
|
|
`totientOfSquare()` deve retornar `5943040885644`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
```js
|
2021-11-22 09:25:21 -08:00
|
|
|
|
assert.strictEqual(totientOfSquare(), 5943040885644);
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
2021-11-22 09:25:21 -08:00
|
|
|
|
function totientOfSquare() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-22 09:25:21 -08:00
|
|
|
|
totientOfSquare();
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|