question
For a fixed natural number $ n \geq 1$ we consider all rational numbers of the form $\frac{p}{q}$, with $p,q \in N*$ and $\frac{n - 1}{n } < \frac{p}{q }< \frac{n}{ n+1}$ Determine the minimum value of the sum $S=p+q$.
my idea
Because $\frac{n - 1}{n }$ and $\frac{n}{ n+1}$ are subunitar we get that
$\frac{p}{q} \in (0,1)$
Which means that $0<p<q$
From here i tried to process the initial inequality, but I have not reached anything.
Hope one of you can help me! Thank you!
It's easier to subtract everything from $1$ first. So write $\frac rq=1-\frac pq$. Now we need $\frac rq\in(\frac1{n+1},\frac1n)$.
Clearly $r=1$ doesn't work, since it would lead to $n<q<n+1$.
Trying $r=2$, we get $\frac1{n+1}<\frac 2q<\frac 1n$, and we can rearrange to get $2n<q<2n+2$. This has a solution, $q=2n+1$, from which we get $p=q-r=2n-1$ and $p+q=4n$.
Now suppose $r\geq 3$. We need $\frac rq<\frac 1n$, so $q>rn$. Since everything's an integer, we have $q\geq rn+1$. Therefore $p+q=2q-r\geq 2rn+2-r\geq 6n-1>4n$. So the solution we found above minimises $p+q$.