Let $x$ be an integer one less than a multiple of $24$. Prove that if $a$ and $b$ are positive integers such that $ab=x$, then $a+b$ is a multiple of $24$.
3 Answers
So $ab \equiv -1 \pmod {24} \implies \gcd(a,24) = \gcd(b,24) = 1$. Then let $ab = 24k-1$ so $b = \frac{24k-1}a$ and $a+b = \frac{24k-1+a^2}a$. Since $\gcd(a,24) = 1$, it follows that $a^2 \equiv 1 \pmod {24}$ and we are done.

- 8,135
mod $24\!:\ ab \equiv -1\,\Rightarrow\, -b \equiv a^{-1} \equiv a,\ $ by $\,a\,$ invertible $\,\Rightarrow\, a^2\equiv 1\,$ by Euler $\phi$ or Carmichael $\lambda$.

- 272,048
Here is a different approach. It is given that $ab+1$ is a multiple of $24$. Since $ab\equiv3\pmod4$ we have $$a\equiv1\pmod4\quad\hbox{and}\quad b\equiv3\pmod4\ ,$$ or vice versa. In either case, $(a-1)(b-1)$ is a multiple of $8$. Likewise, $ab\equiv2\pmod3$ implies $$a,b\equiv1,2\pmod3$$ and so $(a-1)(b-1)$ is a multiple of $3$. Therefore $(a-1)(b-1)$ is a multiple of $24$, and hence $$a+b=(ab+1)-(a-1)(b-1)$$ is also a multiple of $24$.

- 82,662