Simultaneous divisibility condition

113 Views Asked by At

Find all positive integers $m,n$ such that $m-1$ divides $4n-1$ and $n-1$ divides $4m-1$.

Attempt: the first divisibility gives that there is an integer $a$ with $4n-1=a(m-1)$, or, rearranging, $m=\frac{4n+a-1}{a}$. The second divisibility means there is an integer $b$ with $4m-1=b(n-1)$, so $4m=bn-b+1$, i.e. $m=\frac{bn-b+1}{4}$. Substituting into the first equation gives:

\begin{equation} \frac{4n+a-1}{a}=\frac{bn-b+1}{4}, \end{equation}

which is the same as $16n+4a-4=abn-ab+a$, and collecting terms this means $n(16-ab)=4-ab-3a$, so $n=\frac{4-ab-3a}{16-ab}$. We require this to be an integer. But I have no clue how to do so.

1

There are 1 best solutions below

1
On

This is a boring case-by-case analysis after reducing to a finite set of cases.

We will first note that neither $m,n$ can be odd, because $m-1,n-1$ would be even and thus cannot be a divisor of $4n-1, 4m-1.$

Now we will rewrite your first equation for the second case, getting $n=\frac{4m+b-1}b,$ and then substitute for $n$ in the first equation.

Note: $a,b$ must be odd for $n,m$ to be integers, because if $a$ even, $4n+a-1$ is odd and thus cannot be divisible by $a.$ Likewise for $b.$

You get: $$m=\dfrac{4\frac{4m+b-1}b+a-1}{a}$$

Multiplying both sides by $ab,$ you get:

$$mab=16m+4b-4+ab-b$$ or $$(ab-16)m=ab+3b-4$$ Now, since $a,b,m$ are positive, you know that $ab\geq 16.$

So you need a pair $ab-16\mid ab+3b-4,$ or $ab-16\mid 3b+12.$

Now, $ab+3b-4=2ab-(ab-3b+4).$ So if $ab-3b+4>32,$ then the right side is less than $2(ab-16),$ and thus $m=1,$ which is not possible because it is odd.

So $16\leq ab\leq 28+3b.$

So you need to enumerate cases where $ab-3b=(a-3)b\leq 28.$

This is always true when $a=1,3.$

When $a=1$ you need $m=4n,$ and thus $n-1\mid 16n-1$ or $n-1\mid 15.$ So $(n,m)=(2,8),(4,16),(6,24),(16,64).$

When $a=3,$ you get $m=\frac{4n+2}{3}$ and you need $n\equiv1\pmod 3$ to make $m$ an integer, and you need $n-1\mid \frac{16n+5}{3}$ or $3(n-1)\mid 16n+5$ or $$3(n-1)\mid n+20=16n+5-5\cdot 3(n-1).$$ So $3n-3\leq n+20$ or $n\leq 11.$ But $n+20$ must be even and divisible by $9,$ so $n\geq 16.$

When $a>3,$ you get a finite number of $b$ values to check.

In particular, you need $\frac{16}a\leq b\leq \frac{28}{a-3}.$ As noted before, $a,b$ must be odd.

So when $a=5,$ you get $5 \leq b\leq 13.$

When $a=7,$ you get $b=3,5,7.$

When $a=9,$ or $a=11$ you get $b=3.$

When $a=13,15$ there is no $b.$

When $17\leq a\leq 31$ there is $b=1.$

But you can avoid a lot of cases by assuming, by the symmetry of the problem, that $a\leq b.$

This gives options $$(a,b)=(5,5),(5,7),(5,9),(5,11),(5,13),(7,7).$$ Now it is just handling those six cases.

$(a,b)=(5,5)$ gives $(m,n)=(4,4).$

$(a,b)=(5,7)$ then $ab-16=19$ and $3b+12=33,$ so it doesn't work.

$(a,b)=(5,9)$ then $ab-16=29$ and $3b+12=38.$ No answer.

$(a,b)=(5,11)$ then $ab-16=39$ and $33b+12=43.$ No answer.

$(a,b)=(5,13)$ then $ab-16=49$ and $3b+12=51.$ No answer.

When $(a,b)=(7,7)$ then $ab-16=33$ and $3b+12=33,$ and you get $m=2,$ and $n=2.$

So all solutions, with $m\leq n$ are $$(m,n)=(2,2),(4,4),(2,8),(4,16),(6,24),(16,64).$$