Let S_{n} be an integer sequence produced with the following pseudo-random number generator:
S_{0} | =_{ } | 290797_{ } |
S_{n+1} | =_{ } | S_{n}^{2} mod 50515093 |
Let A(i, j) be the minimum of the numbers S_{i}, S_{i+1}, ... , S_{j} 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).
These problems are part of Project Euler and are licensed under CC BY-NC-SA 2.0 UK