Evaluating a sum by applying geometry

91 Views Asked by At

This is really an interesting question:

Evaluate S, where

$$ \large S= \sum_{k=1}^{502} \left\lfloor \frac{305k}{503}\right\rfloor$$

1

There are 1 best solutions below

0
On BEST ANSWER

It is the number of interior lattice points in the triangle ABC, or half of the rectangle ABCD, where A = (0, 0), B = (503, 0), C = (503, 305), and D = (0, 305). Since gcd(305, 503) = 1, so there is no lattice point on AC. There are 502*304 = 152608 interior lattice points in ABCD; so there are S = 152608 /2 = 76304 interior lattice points in ABC.