Let $k\geqslant 2$ be an integer, and $a,b$ be real numbers. prove that $a-b$ is an integer divisible by $k$ if and only if for every positive integer $n$ $$\lfloor an \rfloor \equiv \lfloor bn \rfloor \ (mod \ k)$$ Proposed by Navid Safaei
Problem
Source: 2022 IRN TWN Friendly math competition P1
Tags: number theory, floor function, Iran, Taiwan
24.06.2022 16:21
TheBarioBario wrote: Let $k\geqslant 2$ be an integer, and $a,b$ be real numbers. prove that $a-b$ is an integer divisible by $k$ if and only if for every positive integer $n$ $$\lfloor an \rfloor \equiv \lfloor bn \rfloor \ (mod \ k)$$ Proposed by Navid Safaei
Let $a=k.\left [ \frac{a}{k} \right ]+a', \, a' \in \left [ 0;k \right ); \, b= k.\left [ \frac{b}{k} \right ]+b', \, a' \in \left [ 0;k \right )$ We have: $\left [an \right ]=\left [ \left (k.\left [ \frac{a}{k} \right ]+a' \right ).n \right ]=k.n.\left [ \frac{a}{k} \right ]+\left [ a'n \right ]\equiv \left [ a'n \right ]\textrm{ (mod k)}.$ Similarly, $\left [bn \right ] \equiv \left [ b'n \right ]\textrm{ (mod k)}.$ So $\left [ a'n \right ] \equiv \left [ b'n \right ]\textrm{ (mod k)}.$ Hence, we can assume $k>a \geq b \geq 0.$ $\Rightarrow 0 \leq a-b <k, \, (1)$ We'll prove $a-b=0$ We know that $\left [an \right ]-\left [bn \right ]=$ $\left[ \begin{matrix} & \left [(a-b)n \right ] \\ & \left [(a-b)n \right ]+1 \end{matrix} \right.$ $\Rightarrow \left [(a-b)n \right ] \, \equiv \, 0;k-1 \, \textrm{ (mod k)} . \, (2)$ From $(1)$ and $(2)$, we get: $\left [a-b \right ] \in \left\{0;k-1 \right\}$ If $\left [a-b \right ] =k-1$ then $\left [2(a-b) \right ] \in \left\{2k-2;2k-1 \right\}$, from $(1)$, we get: $\left [2(a-b) \right ]=2k-1$ By induction, we get: $\left [n(a-b) \right ]=nk-1 \, \Rightarrow nk-1 \leq n(a-b)\Leftrightarrow n\leq \frac{1}{k-a+b}, \forall n \in \mathbb{N^*}$, a contradiction. So $\left [a-b \right ] =0$ Continue induction, we get: $\left [n(a-b) \right ] =0, \forall n \in \mathbb{N^*} $ and this yields $a-b=0.$ (Q.E.D)
25.10.2024 11:23
If $a-b=kl$, then $\lfloor (b+kl)n\rfloor\equiv \lfloor bn\rfloor +kln\equiv \lfloor bn\rfloor(mod \ k)$. Now, let's prove the other direction. Set $a=p+x$ and $b=q+y$ where $p,q\in \mathbb{Z}$ and $0\leq x,y<1$. Also we can suppose $k\geq 2$. We have $\lfloor (p+x)n \rfloor\equiv \lfloor (q+y)n\rfloor (mod \ k)$. For $n=1$, $p+\lfloor x\rfloor\equiv q+\lfloor y\rfloor(mod \ k)$ which implies $p\equiv q(mod \ k)$. Hence $\lfloor xn\rfloor\equiv \lfloor yn\rfloor (mod \ k)$. We claim that $\lfloor xn\rfloor=\lfloor yn\rfloor$ for all positive integers $n$. We induct on $n$ with base case $n=1$. Assume that $\lfloor xn\rfloor=\lfloor yn\rfloor$. WLOG $x\leq y$. We see that $\lfloor x(n+1)\rfloor-\lfloor y(n+1)\rfloor\leq \lfloor xn\rfloor+1-\lfloor yn\rfloor=1<k$ which proves our claim. We will prove that if for $1>x,y$ and each positive integer $n$, we have $\lfloor xn\rfloor=\lfloor yn\rfloor$, then $x=y$. Set $y=x+\epsilon$ and suppose that $\epsilon>0$. If $x$ is rational, let $x=\frac{c}{d}$ where $c,d$ are positive integers. Replace $nd$ with $n$ to get that $cn=\lfloor cn\rfloor=\lfloor cn+\epsilon nd\rfloor$. However, choosing $n>\frac{1}{d\epsilon}$ gives contradiction. If $x$ is irrational, then Kronecker's theorem implies that there exists a positive integer $n>\frac{1}{\epsilon}$ such that $\{xn\}>1-\epsilon$. By taking this $n$, we can see that $xn>xn+\epsilon-1>xn-\{xn\}=\lfloor xn\rfloor=\lfloor xn+\epsilon n\rfloor\geq xn+\epsilon n>xn+1$ which is impossible as desired.$\blacksquare$