1
$\begingroup$

The question is to find the value of —

$$\sum_{r=1}^{502} \Big \lfloor \frac{305r}{503}\Big \rfloor$$

The answer is pretty big, so I don't think trial and error will work here. I seriously can't come up with a solution to this problem. I have asked plenty of floor function questions (you can check my profile), but this one is quiet different. Can someone please help me out? Even a hint is greatly appreciated.

$\endgroup$
  • 1
    $\begingroup$ Is there a good reason not to simply automate the computation? $\endgroup$ – lulu May 16 at 17:13
  • $\begingroup$ It is a homework question. $\endgroup$ – PranavGupta53535 May 16 at 17:15
  • 1
    $\begingroup$ Wolfram Alpha $\endgroup$ – Robert Israel May 16 at 17:50
7
$\begingroup$

Here is one way: use Pick's theorem on the triangle with vertices $(0,0), (503,0), (503,305)$.

Or you can do it more algebraically by noting $$ \left\lfloor\frac{305 r}{503}\right\rfloor + \left\lfloor\frac{305(503-r)}{503}\right\rfloor = 305-1=304 $$ for all $1\leq r\leq 502$ (since $503$ is prime).

$\endgroup$
3
$\begingroup$

One can prove the following formula (for, say, positive integers $a, b, c$): $$\sum_{k=0}^{b-1}\Big\lfloor\frac{ak+c}{b}\Big\rfloor=\frac{(a-1)(b-1)+d-1}{2}+d\Big\lfloor\frac{c}{d}\Big\rfloor,\qquad d=\gcd(a,b)$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.