2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
id: 5900f5361000cf542c510048
|
2021-02-06 04:42:36 +00:00
|
|
|
title: 'Problem 457: A polynomial modulo the square of a prime'
|
2018-10-10 18:03:03 -04:00
|
|
|
challengeType: 5
|
2021-02-06 04:42:36 +00:00
|
|
|
forumTopicId: 302131
|
2021-01-13 03:31:00 +01:00
|
|
|
dashedName: problem-457-a-polynomial-modulo-the-square-of-a-prime
|
2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --description--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2021-02-06 04:42:36 +00:00
|
|
|
Let f(n) = n2 - 3n - 1.
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2021-02-06 04:42:36 +00:00
|
|
|
Let p be a prime.
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2021-02-06 04:42:36 +00:00
|
|
|
Let R(p) be the smallest positive integer n such that f(n) mod p2 = 0 if such an integer n exists, otherwise R(p) = 0.
|
|
|
|
|
|
|
|
Let SR(L) be ∑R(p) for all primes not exceeding L.
|
|
|
|
|
|
|
|
Find SR(107).
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --hints--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2021-02-06 04:42:36 +00:00
|
|
|
`euler457()` should return 2647787126797397000.
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
```js
|
2020-12-16 00:37:30 -07:00
|
|
|
assert.strictEqual(euler457(), 2647787126797397000);
|
2018-10-10 18:03:03 -04:00
|
|
|
```
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
# --seed--
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler457() {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler457();
|
|
|
|
```
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --solutions--
|
2020-08-13 17:24:35 +02:00
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|