2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
id: 5900f47b1000cf542c50ff8d
|
|
|
|
title: 'Problem 271: Modular Cubes, part 1'
|
2020-11-27 19:02:05 +01:00
|
|
|
challengeType: 5
|
2019-08-05 09:17:33 -07:00
|
|
|
forumTopicId: 301921
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-271-modular-cubes-part-1
|
2018-09-30 23:01:58 +01:00
|
|
|
---
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --description--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-24 09:09:54 +02:00
|
|
|
For a positive number $n$, define $S(n)$ as the sum of the integers $x$, for which $1 < x < n$ and $x^3 \equiv 1\bmod n$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-24 09:09:54 +02:00
|
|
|
When $n = 91$, there are 8 possible values for $x$, namely: 9, 16, 22, 29, 53, 74, 79, 81. Thus, $S(91) = 9 + 16 + 22 + 29 + 53 + 74 + 79 + 81 = 363$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-24 09:09:54 +02:00
|
|
|
Find $S(13\\,082\\,761\\,331\\,670\\,030)$.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --hints--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2021-07-24 09:09:54 +02:00
|
|
|
`modularCubesOne()` should return `4617456485273130000`.
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
```js
|
2021-07-24 09:09:54 +02:00
|
|
|
assert.strictEqual(modularCubesOne(), 4617456485273130000);
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --seed--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
## --seed-contents--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
2021-07-24 09:09:54 +02:00
|
|
|
function modularCubesOne() {
|
2020-09-15 09:57:40 -07:00
|
|
|
|
2018-09-30 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-07-24 09:09:54 +02:00
|
|
|
modularCubesOne();
|
2018-09-30 23:01:58 +01:00
|
|
|
```
|
|
|
|
|
2020-11-27 19:02:05 +01:00
|
|
|
# --solutions--
|
2018-09-30 23:01:58 +01:00
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|