Median of Products (noch nicht übersetzt)

Problem 793

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

  • S0=290797
  • Si+1=S2imod50515093

Let M(n) be the median of the pairwise products SiSj for 0i<j<n.

You are given M(3)=3878983057768 and M(103)=492700616748525.

Find M(1000003).