← Complete problem index

PROJECT EULER · #0793

Median of Products

Statement only · SolvedOriginal problem ↗

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

  • S0=290797
  • Si+1=Si2mod50515093

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).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.