2018-09-30 23:01:58 +01:00
---
id: 5900f4e41000cf542c50fff5
title: 'Problem 375: Minimum of subsequences'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 302037
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
Let Sn be an integer sequence produced with the following pseudo-random number generator:
2020-11-27 19:02:05 +01:00
2018-09-30 23:01:58 +01:00
S0
2020-11-27 19:02:05 +01:00
=
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
290797
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
Sn+1
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
=
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
Sn2 mod 50515093
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
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.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
Find M(2 000 000 000).
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
2020-11-27 19:02:05 +01:00
`euler375()` should return 7435327983715286000.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
assert.strictEqual(euler375(), 7435327983715286000);
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
function euler375() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
euler375();
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```