Find all positive integers $k<202$ for which there exist a positive integers $n$ such that $$\bigg {\{}\frac{n}{202}\bigg {\}}+\bigg {\{}\frac{2n}{202}\bigg {\}}+\cdots +\bigg {\{}\frac{kn}{202}\bigg {\}}=\frac{k}{2}$$
Problem
Source: APMO 2022 P3
Tags: APMO, algebra, APMO 2022, number theory
17.05.2022 23:23
Well, if $in$ has residue $r_i$ mod $202$, then $\sum r_i = 101k$. But $\sum r_i \equiv n\frac {k(k+1)}{2} (mod 202)$, so $101 | n\frac {k(k+1)}{2}$. If $101$ doesn't divide $\frac {k(k+1)}{2}$, then $101 |n$ but this obviously does not work except for $k=1$, so $k=100, 101, 201$. It is left to add examples for such $n$ for all those $k$, which I might try to do later. Edit: for $k=100$ take $n=2$; for $k=201$ take $n=1$. Those are motivated by grouping terms and looking for the avarage to be $101$
17.05.2022 23:31
Redacted
17.05.2022 23:58
I don't think n=3 works at k=101.
18.05.2022 03:06
The answer is $k=1,100,101,201$. For $k=1,n=101$ works. For $k=100,n=2$ works For $k=101,n=103$ or $n=51$ works. ($n=51$ works is a bit complicated) For $k=201,n=1$ works. For all other $k$, note $101\nmid k(k+1)$ but $\frac{k(k+1)n}{2\cdot 202} \equiv \frac k2 (\bmod\; 1)$. This means $n\equiv 0$ or $n\equiv 101 (\bmod\; 202)$. Clearly $202\nmid n$. If $n\equiv 101(\bmod\; 202)$ then we note LHS is half the number of odd numbers in $[1,k]$. Thus, $k=1$, the end.
18.05.2022 05:29
Just wanted to ask: what's the motivation for finding a value of $n$ that works for $k=101$? I spent the entire time convinced that nothing worked Python gives me loads of weird solutions, how do we find those?
18.05.2022 05:37
how many points just providing the correct answer set is worth?
18.05.2022 05:44
InternetPerson10 wrote: Just wanted to ask: what's the motivation for finding a value of $n$ that works for $k=101$? I spent the entire time convinced that nothing worked Python gives me loads of weird solutions, how do we find those? You just have to believe -- that's how I got it.
18.05.2022 05:46
Note that $202\bigg\{\frac{a}{202}\bigg\}$ is the remainder of $a$ when divided by $202$, therefore $202\bigg\{\frac{a}{202}\bigg\}\equiv a\pmod{202}$.$$n+2n+\cdots kn\equiv 202\left(\frac{k}{2}\right)\pmod{202}\implies 101\mid \frac{k(k+1)n}{2}.$$Assume for the sake of contradiction that there exists $k>1$ when $n=101c$. We have $$\bigg\{\frac{c}{2}\bigg\}+\left\{\frac{2c}{2}\right\}+\cdots+\left\{\frac{kc}{2}\right\}=\frac{k}{2} \ .$$But $\bigg\{\frac{x}{2}\bigg\}=0$ or $\frac{1}{2}$ . By the size argument, we have $$\bigg\{\frac{c}{2}\bigg\}=\left\{\frac{2c}{2}\right\}=\cdots=\left\{\frac{kc}{2}\right\}=\frac{1}{2} \ .$$But since $k>1$, there must exist $\left\{\frac{2c}{2}\right\}=0$ in the sum which is absurd. Thus, if $101\mid n$ then $k=1$. Suppose that $101\nmid n$. Then $101\mid \frac{k(k+1)}{2}$ so $101\mid k$ or $101\mid k+1$. Since $k<202$, $k=100,101,201$. Thus, $k\in\{1,100,101,202\}$. It's easy to see that $(n,k)=(101,1),(2,100),(1,201)$ work. We claim that $(n,k)=(103,101)$ work. Note that for every $1\leq i\leq 101$,$$\text{Remainder of }103i\text{ divided by }202 \text{ are } \begin{cases} 2i+101 &\text{ for odd }1\leq i\leq 49. \\ 2i-101 &\text{ for odd }51\leq i\leq 101. \\2i &\text{ for even }2\leq i\leq 100. \end{cases}$$(The value of remainders are integers in the interval $[0,201]$.) We have \begin{align*}202\bigg(\left\{\frac{n}{202}\bigg\}+\left\{\frac{2n}{202}\right\}+\cdots+\left\{\frac{kn}{202}\right\}\right) &=\sum_{i=1}^{25} (2i-1+101)+\sum_{i=26}^{51}(2i-1-101)+\sum_{i=1}^{50}(2\cdot 2i)\\ &= 10201 \\ &= 202\left(\frac{k}{2}\right). \end{align*}Hence, $k=1,100,101,201$, as desired.
18.05.2022 06:17
InternetPerson10 wrote: Just wanted to ask: what's the motivation for finding a value of $n$ that works for $k=101$? I spent the entire time convinced that nothing worked Python gives me loads of weird solutions, how do we find those? In contest, I found $n=51$ works by replacing $p$ with any 1 mod 4 prime, write $p=4k+1$, then $2k+1$ works where $k\in \{1,3\}$. So I guessed the construction $\frac{p+1}{2}$ works and it did The verification is left to the reader as an exercise Actually, $n=p+2$ is an easier construction
18.05.2022 07:45
$n+2n+...+kn \equiv 101k$ (mod 202), then $\frac{k(k+1)}{2}n \equiv 101k$ (mode 202). Since $101$ is prime, it must satisfy at least $1$ out of $3$ below: $101 | k$, $101 | (k+1)$, $101 | n$. Then do some casework related with remainders.
18.05.2022 16:53
Jalil_Huseynov wrote: Find all positive integers $k<202$ for which there exist a positive integers $n$ such that $$\bigg {\{}\frac{n}{202}\bigg {\}}+\bigg {\{}\frac{2n}{202}\bigg {\}}+\cdots +\bigg {\{}\frac{kn}{202}\bigg {\}}=\frac{k}{2}$$ We want $101|nk(k+1)/2$ so $k=100,101,201$ or $n=101$ for $n=101$ we have only $k=1$ for $k=100,201$ we can get $n=2 ,1$ and the dificult is for $k=101$ where we can get $n=103$ (I see it by CANBANKAN)
18.05.2022 18:49
Let $t_i=(ni \pmod {202})$ for $i \in \{1,2,\ldots, k \}$. Note that $202\{\frac{ni}{202} \}=t_i$ for all $i$, and so the given condition rewrites as $$t_1+\ldots+t_k=101k$$ Moreover $0 \leq t_i<202$ for all $i$. Note that $t_i-it_1 \equiv ni-ni \equiv 0 \pmod {202}$, and so $$202 \mid (t_2-2t_1)+\ldots+(t_k-kt_1)=101k-t_1-2t_1-\ldots-kt_1=101k-\frac{k(k+1)}{2}t_1$$ Therefore, $101 \mid \frac{k(k+1)}{2}t_1$, and since $k,t_1<202$, we infer that $k=101$ or $k=100$ or $k=201$ or $t_1=101$ If $t_1=101$, then $n \equiv 101 \pmod {202}$ and we easily get $t_{2i} =0$ and $t_{2i+1}=101$ for all $i$, hence if $k$ is even we have $t_1+\ldots+t_k=101 \cdot \frac{k}{2} \neq 101k$, while if $k$ is odd we have $t_1+\ldots+t_k=101 \cdot \frac{k-1}{2}+101$, and this equals $101k$ only when $k=1$, and so $k=1$ with $n=101$ works. If $k=100$, we may take $n=2$, and so $t_i=2i$ for all $i$, hence $$t_1+\ldots+t_{100}=2(1+2+\ldots+100)=100 \cdot 101,$$ and so $k=100$ works. If $k=201$, we may take $n=1$, and so $t_i=i$ for all $i$, hence $t_1+\ldots+t_{201}=201 \cdot 101$, as desired. Lastly, if $k=101$ we may take $n=103$. In order to show this works, note that $t_{2i+1}=4i+103$ for all $i \leq 24$ and $t_{2i+1}=4i-99$ for all $25 \leq i \leq 50$, and $t_{2i}=4i$ for all $i$, hence $$t_1+\ldots+t_{101}=4(1+\ldots+50)+103 \cdot 25+4(0+1+\ldots+24)-26 \cdot 99+4(25+\ldots+50)=101^2,$$ as desired. To sum up, the only working $k$ are $1, 100,101$ and $201$.
18.05.2022 19:43
We'll change the problem to find $k<202$ such that there exist a positive integers $n$ such that $\bigg {\{}\frac{n}{202}\bigg {\}}+\bigg {\{}\frac{2n}{202}\bigg {\}}+\cdots +\bigg {\{}\frac{kn}{202}\bigg {\}}-\frac{k}{2}$ is an integer, then we'll plug in the solution later. It's equivalent to: $\bigg {\{}\frac{n}{202}\bigg {\}}+2\bigg {\{}\frac{n}{202}\bigg {\}}+\cdots +k\bigg {\{}\frac{n}{202}\bigg {\}}-\frac{k}{2}= t$ $(t\in\mathbb Z)$ $\Rightarrow\frac{k(k+1)}{2}\bigg {\{}\frac{n}{202}\bigg {\}}-\frac{k}{2}=t$ $\Rightarrow k(k+1)\left(\frac{n}{202}-\left[\frac{n}{202}\right]\right)=2t+k$ $\Rightarrow k(k+1)\left(\frac{n}{202}\right)=2t+k+k(k+1)\left[\frac{n}{202}\right]$ It's easy to see that $k=1,100,101,201$ work now, I'll leave here for readers to try it out
23.05.2022 06:41
Note that \[\frac{n}{202}+\frac{2n}{202}+\cdots+\frac{kn}{202}=\frac{nk(k+1)}{404}\equiv \frac{k}{2}\pmod{1}\] So $\frac{nk(k+1)}{404}\equiv \frac{202k}{404}\pmod 1$, so \[nk(k+1)\equiv 202k\pmod{404}\] This implies that $202\mid nk(k+1)$. Claim: Either $k=1$ or $202\mid k(k+1)$. Proof: Suppose $202\nmid k(k+1)$. Then also $101\nmid k(k+1)$, so $101\mid n$. Now we can WLOG $n\le 202$ because subtracting $n$ by $202$ doesn't do anything to the fractional parts. If $n=202$, then $\frac{k}{2}=0$, a contradiction. If $n=101$, then $\frac{k}{2}=\frac{1}{2}\cdot \lceil \frac{k}{2} \rceil\implies \lceil \frac{k}{2}\rceil =k$. This implies $\frac{k}{2}> k-1\implies k> 2k-2\implies k<2$, so $k=1$, as desired. $\blacksquare$ We have shown that everything except $\boxed{1,100,101,201}$ don't work. It remains to show that these values work. For $k=1$, set $n=101$. This works because $\{\frac{101}{202}\}=\frac{1}{2}$. For $k=100$, set $n=2$. This works because \[\left\{\frac{2}{202}\right\}+\left\{\frac{4}{202}\right\}+\cdots + \left\{\frac{200}{202}\right\}=\frac{10100}{202}=\frac{100}{2}\] For $k=201$, set $n=1$. This works because \[\sum_{i=1}^{201} \left\{\frac{i}{202}\right\}=\sum_{i=1}^{201} \frac{i}{202}=\frac{201\cdot 101}{202}=\frac{201}{2}\] For $k=101$, set $n=103$. Note that $2n\equiv 4\pmod{202}$ and $51n\equiv 1\pmod{202}$. Note that \[\sum_{i=1}^{50}\left\{\frac{2i}{202}\right\}=\frac{4+8+\cdots 200}{202}=\frac{5100}{202}\] Also, \[\sum_{i=0}^{25} \left\{\frac{2i+1}{202}\right\}=\frac{103+107+\cdots+ 199}{202}=\frac{3775}{202}\]and \[\sum_{i=25}^{50} \left\{\frac{2i+1}{202}\right\}=\frac{1+5+\cdots + 101}{202}=\frac{1326}{202}\] Now we add everything up. \[\sum_{i=0}^{101} \left\{\frac{i}{202}\right\}=\frac{5100+3775+1326}{202}=\frac{10201}{202}=\frac{101}{2},\]as desired. Thus, all of $1,100,101,201 $ work.
23.05.2022 16:07
Very nice problem
29.08.2022 01:39
The best approach to proving 101 works is by analogy with 9 seemingly
11.09.2022 18:07
Solution : The solution of $k =1,100,101,201$. Case 1 : If $k=1$,then $n=101$ works. Case 2 : If $k=100$ ,then $n=2$ works. Case 3 : If $k=101$,then $n=103$ or $n=51$ . Case 4 : If $k=201$,then $n=1$ . Now for all other $k$, note $101\nmid k(k+1)$ but $\frac{k(k+1)n}{2\cdot 202} \equiv \frac k2 (\bmod\; 1)$ which means $n\equiv 0$ or $n\equiv 101 (\bmod\; 202)$. Observe that 202 does not divide $n$. If $n\equiv 101(\bmod\; 202)$ then carefully see that LHS is half the number of odd numbers in $[1,k]$. Therefore $k=1$.
31.01.2023 03:06
All solutions are $k\in \left \{ 1,100,101,201\right \}$. Notice that $k(n(k+1)-202)=404a$ for $a\in \mathbb Z,$ and since LHS is a multiple of $101,$ it follows that $101$ divides at least one of numbers $k,n,(k+1).$ This trivially reduces the problem to case $k\in \left \{ 1,100,101,201\right \}$. By a straightforward check the following substitutions work: for $k=1$ take $n=101;$ for $k=100$ take $n=2;$ for $k=101$ take $n=103;$ for $k=201$ take $n=1.$
18.02.2023 12:51
The only harder point in the problem is the case k=101
12.03.2023 15:43
LHS $= \frac{nk(k+1)}{404} - \sum \frac{ni}{202} $ $\therefore \frac{nk(k+1)}{404} - \frac{k}{2}$ must be an integer, which implies that $k=101$ or $k \equiv -1 \pmod{101}$ or $101 \mid n$. Simple casework gives us the answer Edit: Top expression should have floor function in it. Too dumb to code it in latex.
07.11.2023 02:04
Let $a_i\equiv in\pmod{202}, 1\leq i\leq k$ Then $\sum_{i=1}^k \left\{\frac{in}{202}\right\}=\frac{1}{202}\sum_{i=1}^k a_i=\frac{k}{2}\implies \sum_{i=1}^k a_i=101k$ $\implies 101k\equiv\sum_{i=1}^k in\equiv \frac{1}{2}k(k+1)n\pmod{202}$ $\implies k(k+1)n\equiv202k\equiv0\pmod{202}\implies 202\vert k(k+1)n$ Case 1: $101\vert k(k+1)\implies k=100,101,201$ For $k=100$, $n=2$ works For $k=101$, $n=103$ works (why is left as an exercise for the reader) For $k=201$, $n=1$ works Case 2: $101\vert n\implies\sum_{i=1}^k \left\{\frac{in}{202}\right\}=\frac{\lceil\frac{k}{2}\rceil}{2}=\frac{k}{2}\implies k=1$ So the final answer is $k=1,100,101,201$
16.01.2025 17:34
Suppose $k$ works. Note that $\left \{\frac{n+202}{202}\right \}=\left \{\frac{n}{202}\right \}$. Hence, we can assume $n<202$. For every $i\geq 1$, there must exists an integer $t_i\geq 0$ such that $$\left \{\frac{i\cdot n}{202}\right \}=\frac{n-202t_i}{202}=\frac{n}{202}-t_i.$$Let $t=t_1+t_2+\cdots+t_k$. We have $$\frac{n}{202} \cdot \frac{k(k+1)}2-t=\frac k2 \implies n=\frac{202(2t+k)}{k(k+1)} \qquad (1)$$ If $101\nmid k(k+1)$ then $k(k+1)\mid 2(2t+k)$ from $(1)$. Also, since $n<202$, we must have $2t+k<k(k+1)$. It follows that $k(k+1)=2(2t+k)$ (since there is a $c$ such that $c\cdot k(k+1)=2(2t+k)$ and $c\leq 2$ by the inequality). Hence $t=\frac{k(k-1)}4$ and $(1)$ implies that $n=101$. Note that $\{1/2\}+\{2/2\}+\dots+\{k/2\}=\begin{cases} k/4 & 2\mid k \\ (k+1)/4 & 2\nmid k \end{cases}$. It follows that $\frac{k+1}4=\frac k2$, i.e. $k=1$, this clearly works. Now, suppose $101\mid k(k+1)$ then $k\in \{101,100,201\}$. For $k=100$ take $n=4$, for $k=201$ take $n=3$ and for $n=101$ take $k=103$ and we can easily verify that they work.