# Let M and N be single-digit integers. If the product 2M5 x 13N is divisible by 36, how many ordered pairs (M,N) are possible? [closed]

Let M and N be single-digit integers. If the product 2M5 x 13N is divisible by 36, how many ordered pairs (M,N) are possible?

-- source

I tried it by reducing 36 into its positive factors (1,2,3,4,6,9,18,36) and then solving, but I got way too many pairs. Can somebody help?

## closed as off-topic by elias, gabbo1092, Glorfindel, Rupert Morrish, athinJun 9 at 22:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is off-topic as it appears to be a mathematics problem, as opposed to a mathematical puzzle. For more info, see "Are math-textbook-style problems on topic?" on meta." – elias, gabbo1092, Glorfindel, Rupert Morrish, athin
If this question can be reworded to fit the rules in the help center, please edit the question.

• What do you mean by $2M5$ and $13N$? Are these concatenated numbers (two hundred something and five, one hundred and thirty something) or products (two times M times five, thirteen times N)? – Rand al'Thor Jun 6 at 9:32
• Also, what is your source for these questions? – Rand al'Thor Jun 6 at 9:33
• Or power $2M^5$? – Weather Vane Jun 6 at 9:38
• To the close-voters: as the first answerer here, I think this is mathematically "interesting" enough not to be closed. It requires some knowledge of basic number theory (prime factorisations) if you want to do it in a quick neat way rather than brute-forcing all possibilities. – Rand al'Thor Jun 6 at 15:36
• Sorry for answering so late. Yes, @Randal'Thor, 2M5 and 13N are concatenated numbers. And as for the source of these questions, I have a book. – Siddharth Garg Jun 6 at 16:37

## 2 Answers

I'll assume here that the number $$2M5$$ and $$13N$$ are concatenated three-digit numbers rather than products, because if they are products then the question is trivial.

Being divisible by 36 is equivalent to

being divisible by both of its prime factors $$4=2^2$$ and $$9=3^2$$.

1. $$2M5$$ is odd, so both factors of 2 must come from $$13N$$. That means $$3N$$ must be a multiple of 4, so either $$N=2$$ or $$N=6$$. In either of these cases, the product is definitely a multiple of 4 - it's an "if and only if" condition.

2. If the product is divisible by 9, then either both factors are multiples of 3 (i.e. their digit sums are multiples of 3) or one of the two factors is a multiple of 9 (i.e. its digit sum is a multiple of 9).

Let's consider the two cases from the first numbered point above:

• If $$N=2$$, then $$132$$ is divisible by 3 but not 9, so we need $$2M5$$ divisible by 3, i.e. $$2+M+5$$ divisible by 3, which means either $$M=2$$ or $$M=5$$ or $$M=8$$. In all of these cases, the product is definitely a multiple of 9.

• If $$N=6$$, then $$136$$ is not divisible by 3, so we need $$2M5$$ divisible by 9, i.e. $$2+M+5$$ divisible by 9, which means $$M=2$$. Again, in this case the product is definitely a multiple of 9.

So the possibilities for the pair $$(M,N)$$ are:

$$(2,2),(5,2),(8,2),(2,6)$$ - four possibilities in all.

• @WeatherVane It's nothing to do with "you" or "me" - don't take it personally. I don't like answers which use computers instead of elegant mathematics, but i don't go around downvoting or deleting them either (unless they're on questions tagged no-computers, which this isn't). On this site, we're commenting/voting on content not people, as you should know :-) – Rand al'Thor Jun 6 at 10:55
• Just to balance the comment you decided to leave, nobody downvoted or deleted a question, or suggested the mutual voting you accused me of requesting. You could have deleted it with the others, but for some reason decided not to. – Weather Vane Jun 6 at 17:42

Confirmation of the answer from Rand al'Thor using brute force with C - only 100 perms:

 #include <stdio.h>

int main(void)
{
for(int M = 0; M < 10; M++)
for(int N = 0; N < 10; N++)
if(((205 + 10 * M) * (130 + N)) % 36 == 0)
printf("%d %d\n", M, N);
}
2 2
2 6
5 2
8 2