Prime Intervals

Let p and q be distinct primes. Divide the interval [0,1] into p equal subintervals by red dots, into q equal subintervals by blue dots, and by p + q equal subintervals by (p+q) green dots.

Show that each interval between two green dots can contain at most one red or blue dot.

In the illustration below, p = 3 and q = 5, with 8 green intervals.

Solution