2018-10-10 18:03:03 -04:00
---
id: 5900f4e41000cf542c50fff5
2021-02-06 04:42:36 +00:00
title: 'Problem 375: Minimum of subsequences'
2018-10-10 18:03:03 -04:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 302037
2021-01-13 03:31:00 +01:00
dashedName: problem-375-minimum-of-subsequences
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 Sn be an integer sequence produced with the following pseudo-random number generator:
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
S0
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
=
290797
Sn+1
=
Sn2 mod 50515093
Let A(i, j) be the minimum of the numbers Si, Si+1, ... , Sj for i ≤ j. Let M(N) = ΣA(i, j) for 1 ≤ i ≤ j ≤ N. We can verify that M(10) = 432256955 and M(10 000) = 3264567774119.
Find M(2 000 000 000).
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
`euler375()` should return 7435327983715286000.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert.strictEqual(euler375(), 7435327983715286000);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```js
function euler375() {
return true;
}
euler375();
```
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
```