I am a bit confused over this and not sure how to rigorously deal with the following proposition:

If $a$ and $b$ are relatively prime numbers and happen to be odd, is it true that $ab(b+a)(b-a)$ will be a multiple of $24$?

  • 3
    $\begingroup$ Hint: You need to show that it is divisible by $3$ and by $8$. Work the two separately. $\endgroup$
    – lulu
    Apr 6, 2017 at 13:11
  • $\begingroup$ Note: you don't need to know that $a,b$ are relatively prime, just that they are both odd. $\endgroup$
    – lulu
    Apr 6, 2017 at 13:13
  • 4
    $\begingroup$ Please, when you ask a question, add your thoughts on it, and your attempts at answering it, and/or what exactly it is you are confused about. As it stands, it looks like you want us to do your homework for you, rather than you doing your homework, with assistance from us. This site runs much more smoothly, for everyone concerned, when askers demonstrate engagement with the process of learning, a process in which we are here to help engaged askers find a path to help themselves. $\endgroup$
    – amWhy
    Apr 27, 2017 at 17:27
  • $\begingroup$ You show no attempt or effort to help yourself. This is not a site for dumping your homework so we do it for you. Doing so shows lack of respect for the community. $\endgroup$
    – amWhy
    Apr 27, 2017 at 17:28
  • $\begingroup$ Fine. When you delete a post that has net negative score, such deletions, as well as closures, are factors that weigh into whether/when an account will be forced to slow down (quota given on number of questions asked per day or per week), or, when such a pattern is well established (downvotes out-weighing upvotes, deletion of low scoring posts, number of votes to put-on hold, number of posts put on hold, exceeds what is expected of users here, one's account can be, if infractions are serious enough, be blocked permanently from further activity on this site. $\endgroup$
    – amWhy
    Apr 27, 2017 at 18:11

2 Answers 2


$24=8\cdot 3$ so we need to show that $8$ and $3$ divide that number.

First, let's consider $(a+b)(a-b)$. Since $a,b$ are odd, both of these are even. Furthermore, we can check by going through the possible values of $a,b\pmod{4}$ that at least one is a multiple of $4$. $1-1,1+3,3+1,$ and $3-3$ are all $0\pmod{4}$. Since both are even and one is a multiple of four, their product is a multiple of $8$, and so the entire number is.

Now let's show its divisible by $3$. If either $a$ or $b$ are then we are done, so assume not. If $a=b=1\pmod{3}$ then $3|a-b$, and likewise if $a=b=2\pmod{3}$. But if $a$ and $b$ are $1$ and $2\pmod{3}$ in either order, then $a+b=0\pmod{3}$. Thus we are guaranteed that some term is divisible by $3$ and so the entire number is divisible by $3$ and $8$ and therefore $24$. This is because $3$ and $8$ are relatively prime, and so we can use the lemma that if $(a,b)=1$, then $a|bc\iff a|c$

Note: I never used that they are relatively prime, and the second line of reasoning works for any integer $a,b$, not just odd ones.

  • 1
    $\begingroup$ This was much simpler than I had imagined! $\endgroup$
    – Fine
    Apr 6, 2017 at 13:23
  • 1
    $\begingroup$ You did use/need the fact that 8 and 3 are relatively prime: $24 = 4 \cdot 6$ but not all numbers divisible by 4 and 6 (e.g. 12) are divisible by 24. $\endgroup$
    – TMM
    Apr 6, 2017 at 16:31
  • $\begingroup$ @TMM I've edited accordingly $\endgroup$ Apr 6, 2017 at 16:39
  • $\begingroup$ @ downvoter, got an explanation for what you possibly couldn't like? $\endgroup$ Apr 28, 2017 at 13:48
  • $\begingroup$ But you do indeed use that $a, b$ are odd, despite your claim not to have used it: when you argue that $4\mid ab(a+b)(a-b)$. If a is odd and b is even, then we know only that $2\mid ab(a+b)(a-b)$. Now, suppose $a=1, b=2$; then we have $ab(a+b)(a-b) = 2(3)(-1)= -6$. Certainly, you can see that $24$ does NOT divide $-6$. $\endgroup$
    – amWhy
    Apr 28, 2017 at 16:38

Here is a method exploiting the fact that powers are often reductible to lesser exponents, especially when working modulo $2$ or $3$.

Let's have $c=ab(a+b)(a-b)=a^3b-ab^3$

We always have $x^3\equiv x \pmod 3\quad$

So $c \pmod 3\equiv ab-ab\equiv 0$.

Now let assume $a,b$ have same parity $r=0$ or $1$ : $\begin{cases} a=2n+r\\ b=2p+r\\ \end{cases}$


$c \pmod 8\equiv 4n^2r^2-4r^2p^2+4r^3n-4r^3p\equiv 4\underbrace{(n^2r^2-r^2p^2+r^3n-r^3p)}_\text{even}\equiv 0$

Because modulo $2$ we always have $x^k\equiv x\pmod 2$ so

$(n^2r^2-r^2p^2+r^3n-r^3p)\equiv nr-rp+rn-rp\equiv 0\pmod 2$

Conclusion if $a,b$ both odd or both even then $c$ is divisible by $24$.


Not the answer you're looking for? Browse other questions tagged .