How many integer solutions for $a = n(4m-1)/4b$?

154 Views Asked by At

For the equation \begin{equation} a = \frac{n(4m-1)}{4b} \end{equation} where $n,m,a$ and $b$ are positive integers and $1\leq a,b\leq n$, how many valid, unique solutions $(a,m)$ exist for fixed $n$ and $b$? I am also interested in a weaker form of the question: what is the maximum number of solutions possible for any given $n$?

I understand that $n$ has to be divisible by 4, but I am unsure about the division by $b$ since it could be any integer from $1$ to $n$ and $m$ is a "free" parameter that does not have any constraints (besides being integer). Unfortunately, my handle on number theory is rather weak so I also don't know how to convert this information into finding the number of solutions.

2

There are 2 best solutions below

0
On BEST ANSWER

Since $n$ is a multiple of $4$, we might as well let $n=4q$ and we are looking at $ab=q(4m-1)$.

Temporarily let us not worry about the condition $a\le n=4q$. Then $m$ gives a solution precisely if $b$ divides $q(4m-1)$. Let $\gcd(b,q)=d$ and let $b=db'$, $q=dq'$. So we want $b'$ to divide $q'(4m-1)$, and therefore we want $b'$ to divide $4m-1$.

If $b'$ is even, there is no solution. So let $b'$ be odd. Then, without considering the condition $a\le n$, we have infinitely many solutions.

Now the condition $a\le n$ can be dealt with easily. If there is a solution, then $m$ gives a solution if and only if $4nb\ge n(4m-1)$, that is, if $4m-1\le 4b$. There are $b$ possibilities.

4
On

So, if I understood exactly you question, you are looking for the $(x,y)$ solutions to $$ \left\{ \begin{gathered} x = \frac{{n\left( {4y - 1} \right)}} {{4b}}\quad \Rightarrow \quad 4ny - 4bx = n \hfill \\ 0 \leqslant y \hfill \\ 1 \leqslant x,b \leqslant n \hfill \\ \end{gathered} \right. $$ which can be recasted as: $$ \left\{ \begin{gathered} z = x-1 \hfill \\ 4ny - 4bz = n + 4b \hfill \\ 0 \leqslant z \leqslant n-1 \hfill \\ 0 \leqslant y \hfill \\ 1 \leqslant b \leqslant n \hfill \\ \end{gathered} \right. $$ and which is a classical linear diophantine equation (in $y,z=x-1$), with non-negative solutions, and apart the upper-bond to z.
Then, as how to solve it you may refer to this other post.