0%

# Problem 375

Minimum of subsequences

Let Sn be an integer sequence produced with the following pseudo-random number generator:

$$S_0=290797$$ $$S_{n+1}=S_n^2 \text{ 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).

$$S_0=290797$$ $$S_{n+1}=S_n^2 \text{ mod } 50515093$$