This is really an interesting question:
Evaluate S, where
$$ \large S= \sum_{k=1}^{502} \left\lfloor \frac{305k}{503}\right\rfloor$$
This is really an interesting question:
Evaluate S, where
$$ \large S= \sum_{k=1}^{502} \left\lfloor \frac{305k}{503}\right\rfloor$$
Copyright © 2021 JogjaFile Inc.
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.