MathLabs

Problem 3

Find all positive integers k<202k<202 for which there exists a positive integer nn such that {n202}+{2n202}+⋯+{kn202}=k2,\left\{\frac{n}{202}\right\}+\left\{\frac{2n}{202}\right\}+\cdots+\left\{\frac{kn}{202}\right\}=\frac{k}{2}, where {x}\{x\} denotes the fractional part of xx. (Here {x}\{x\} is the real number rr with 0≤r<10\le r<1 such that x−rx-r is an integer.)
Step 1 of 5: Dispose of the residues n=0 and n=101
n=0⇒sum=0≠k2;n=101⇒condition holds  ⟺  k=1n=0\Rightarrow\text{sum}=0\ne\tfrac{k}{2};\qquad n=101\Rightarrow\text{condition holds}\iff k=1
Detailed analysis

Since {in/202}\{in/202\} only depends on nn modulo 202202, it suffices to take 0≤n<2020\le n<202. If n=0n=0 every term is 00, so the equation fails for every kk. If n=101n=101, one checks directly that the equation holds exactly when k=1k=1. From now on assume 101∤n101\nmid n.