RSS FeedUse secure connection
projecteuler.net

Minimum of subsequences

Problem 375

Published on Saturday, 10th March 2012, 10:00 pm; Solved by 472

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

S0 =  290797 
Sn+1 =  Sn2 mod 50515093

Let A(i, j) be the minimum of the numbers Si, Si+1, ... , Sj for ij.
Let M(N) = ΣA(i, j) for 1 ≤ ijN.
We can verify that M(10) = 432256955 and M(10 000) = 3264567774119.

Find M(2 000 000 000).