← Complete problem index

PROJECT EULER · #0790

Clock Grid

Statement only · UnsolvedOriginal problem ↗

There is a grid of length and width 50515093 points. A clock is placed on each grid point. The clocks are all analogue showing a single hour hand initially pointing at 12.

A sequence St is created where: S0=290797St=St−12mod50515093t>0 The four numbers Nt=(S4t−4,S4t−3,S4t−2,S4t−1) represent a range within the grid, with the first pair of numbers representing the x-bounds and the second pair representing the y-bounds. For example, if Nt=(3,9,47,20), the range would be 3≤x≤9 and 20≤y≤47, and would include 196 clocks.

For each t (t>0), the clocks within the range represented by Nt are moved to the next hour 12→1→2→⋯.

We define C(t) to be the sum of the hours that the clock hands are pointing to after timestep t.
You are given C(0)=30621295449583788, C(1)=30613048345941659, C(10)=21808930308198471 and C(100)=16190667393984172.

Find C(105).

Write-up coming later

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