# Given information about remainder and find the dividend.

The number m yields a remainder p when divided by 14 and a remainder q when divided by 7. If p=q+7 then (Find the value of m) m=?

• Welcome to MSE. It will be more likely that you will get an answer if you show us that you made some effort. – José Carlos Santos Sep 26 '17 at 7:43
• Not sure I understand the question... As is, any number between any number of the form x+14k, where x is in [7, 13] and k is a natural integer, would work... – gdelab Sep 26 '17 at 7:45

From the fact that $m$ leaves a remainder $p$ when divided by $14$, we can model $m$ as: $m = 14r + p$, where $r$ is the quotient. Now if we take $m$ modulo $7$, we get: $m = (14r$ mod $7)$ $+ (p$ mod $7)$ $= p$ mod $7$ $=q$.
So, the information that you gave $p = q+7$ doesn't help more than just telling that $p$ which is a number modulo 14, i.e. $p \in \{0,13\}$ is indeed $\geq 7$ and $\leq 13$. Now you can iterate over all these values of $p$, and assume $r$ by yourself (you can iterate over $r$ as well starting from 1), to get all the valid values for the number $n$ within the mentioned constraints.
Another observation to prune down your possibilities for $m$ is that $q$ can not be 7 because if it is $7$, then $p$ has to be 14, which is not possible.