# Finding a number given its remainder when divided by other numbers

I have this GRE question that I'd like to know how to solve. I want to solve it in as simple a way as possible, since it is GRE material. In particular, I don't want to use "congruences" or modulo arithmetic that I came across in other posts.

Here it is:

When the positive integer $n$ is divided by $3$ the remainder is $2$. When it is divided by $5$, the remainder is $1$. What is the least possible value of $n$?

Here's my effort: $$n=3q_1+2\tag1$$ $$n=5q_2+1\tag1$$

Great! I now have 2 equations and 3 unknowns. Can someone help me out please? Thanks. (I can imagine going through all positive integers and plugging them in to find the appropriate integer, but that seems rather trivial and inelegant. Is there another way?)

• Please try to include the whole question here, rather than linking an image. – Aryabhata Mar 30 '13 at 2:59

List the numbers that give remainder $1$ on division by $5$, looking for remainder $2$ on division by $3$. Start listing: $1$, $6$, $11$. Bingo!

Remark: This is probably the quickest way to solve the GRE problem. An alternative is to list the numbers that leave remainder $2$ on division by $3$, and look for remainder $1$ on division by $5$. That is a little slower: things increase faster if we count by $5$'s than if we count by $3$'s.

As to elegance, that requires thinking, and the GRE is not about that. On to the next question.

$n+4$ is divisible by $3$ and $5$. So $15-4 = 11$.

• Of course, CRT, though. But GRE problems might be amenable to such observations... – Aryabhata Mar 30 '13 at 2:56

The Chinese remainder theorem is the key tool to solve this sort of problem, though given that this question is being asked in a timed test situation, and the numbers involved are quite small, I would highly recommend the "inelegant" approach, as it will be faster.

This is solved by the Chinese Remainder Theorem. But you are on the right track: Equate both: $$3 q_1 + 2 = 5 q_2 + 1$$ So you know $3 q_1 + 1 = 5 q_2$. Look for a pair satisfying this, like $q_1 = 3$ and $q_2 = 2$. This gives the pair $3 \cdot 3 + 2 = 11$ and $2 \cdot 5 + 1 = 11$. Other solutions are $11 + 3 \cdot 5 \cdot k = 11 + 15 k$.

It's quite simple: test which of $\rm\:n = 5q\!+\!1 = 1,6,11\:$ has the desired remainder when divided by $3$. Since the remainders mod $\,3\,$ are $\rm\,1\to 1,\ 6\to 0,\ 11\to 2,\,$ it is $11$ with sought remainder $=2.$

The same quick test works if we replace $\,5\,$ by any $\rm\:m\:$ not divisible by $3.\,$ To find $\rm\:n\:$ such that $\rm\:3q+r = n = m\,j+k,\:$ test which of $\rm\: k,\, k\!+\!m,\, k\!+\!2m\:$ has remainder $\rm\:r\:$ when divided by $3$.

More generally, the same will work for any two coprime divisors (moduli), but you will need to generate a test sequence of $\rm\:d\:$ values, where $\rm\:d\:$ is the least divisor (modulus). The theory behind this is explained by the Chinese Remainder Theorem.

For 1st stat., possible values are= 2 5 8 11 14 . . . For 2nd stat., the possible values are= 1 11 . . . now for the given number, the remainder is the first common integer and divisor would be least common multiple (l.c.m) of two divisor i.e 15. So the number is 15n+11 where n=0,1,2,3,4,... Therfere least value of n=11.

• Welcome to Math.SE. This question has been answered with similar answers long time back. You have contributed nothing new in your answer. It would be better in such cases to tackled unanswered questions. – Shailesh Apr 19 '17 at 13:41
• $n=3a+2$ equation 1
• $n=5b+1$ equation 2

$a$ has to be $b+1$, since the remainder difference is 1.

Substituting a by $b+1$ in equation 1 gives

$$n=3b+3+2$$

therefore

$$n=3b+5$$ $$3b=n-5$$ $$b=\frac{n-5}{3}$$

Substituting b in equation 2 gives:

$$n=\frac{5n-25}{3}+1$$ $$n=\frac{5n-25+3}{3}$$ $$5n-3n-22=0$$ $$2n-22=0$$ $$2n=22$$ $$\underline{\underline{n=11}}$$