Let $a,b,c,d \in \mathbb N , d \ne 0$ and consider the funtion $f: \mathbb N \rightarrow \mathbb N $ such that : $$f(n)=\left \lfloor \frac{an+b}{cn+d}\right \rfloor , \forall n \in \mathbb N$$ Prove that $(c=0 , b < d , 0 < a \le d) \implies f$ is a surjective function
I tried to solve this Olympiad problem by myself. My solution is totally different from the one presented by the author, so it is difficult for me to self-evaluate. Can you please tell me if the solution below is complete and correct? And if you can give it a score from 0 to 7? Thanks !
My attempt :
Let's consider $c=0, b < d , 0 < a \le d$ , so the function becomes $f(n)=\left \lfloor \frac{an+b}{d}\right \rfloor , \forall n \in \mathbb N$ . Let $k \in \mathbb N$ such that $ f(n)=k \implies$ $$ \implies k = \left\lfloor \frac{an+b}{d}\right \rfloor \implies $$ $$\implies k \le \frac{an+b}{d} < k +1 \implies$$ $$ \implies kd \le an+b < kd + d \implies $$ (we can devide by $a$ since $a > 0$ ) $$\implies \frac{kd-b}{a} \le n < \frac{kd-b+d}{a} $$ Now I will prove that $n = \lfloor \frac{kd-b}{a} \rfloor + 1 $ checks the condition above. First , from the definition of the floor function it is obvious that $\lfloor \frac{kd-b}{a} \rfloor + 1 > \frac{kd-b}{a}$.Second , $\lfloor \frac{kd-b}{a} \rfloor + 1 \le \frac{kd-b}{a}+1 = \frac{kd-b+a}{a} < \frac{kd-b+d}{a}$. (COMMENT the inequality is strict because otherwise we would have $d=a$ and $kd-b$ is divisible by $a$ $\implies$ $b$ is divisible by $a$ but $b \le d = a \implies b = a $ , but $ b < d \implies$ false )
So I proved that for an arbitrarily chosen $k \in \mathbb N$, there is an $n$ such that $f(n)=k \implies \forall k \in \mathbb N , \exists n = \lfloor \frac{kd-b}{a} \rfloor + 1 \in \mathbb N$ such that $f(n)=k \implies f$ is a surjective function.
Your solution is correct but your argument for the strict inequality is a bit unclear. I'd rather say: let $u:=\frac{kd-b}a$ and $n:=\lfloor u\rfloor+1$. Then, $$n\le u+1\le u+\frac da$$ and $n=u+\frac da$ is impossible because if it were the case, we would have $d=a$ and $$\frac bd=k-n+1\in\Bbb Z,$$ which is absurd since $0\le\frac bd<1$.
Edit1. After reading this answer, you improved well your argument for the strict inequality. I still find mine clearer.
Edit2. I won't score your proof.