How can I find integers which satisfy $\frac{150+n}{15+n}=m$? Here are some facts about myself:


*

*In 2017, I was $15$ years old.

*Canada, my country, was $150$ years old.


When will be the next time that my country's age will be a multiple of mine?
I've toned this down to a function. With $n$ being the number of years before this will happen and $m$ being any integer,
$$\frac{150+n}{15+n}=m$$
How would you find $n$?
 A: We want the smallest positive integer $n$ such that there is some (positive) integer $k$ such that
$$\frac{150+n}{15+n}=k.$$
Note that $k=1$ can never work, so we can assume $k-1\neq0.$ Now we rearrange the above equation: multiplying both sides by $15+n,$ we get $150+n=15k+nk;$ now rearrange and factorize to get $15(10-k)=(k-1)n;$ and now divide both sides by $k-1,$ to get
$$n=\frac{15(10-k)}{k-1}.$$
Since we want the smallest positive integer $n,$ we can just try values of $k\in\{2,3,\ldots,9\},$ starting from the largest and working our way down (because the function of $k$ on the right-hand side is decreasing in this range), until we arrive at an integer value of $n.$* When $k=9,$ $8$ or $7$ we get non-integer values of $n;$ when $k=6$ we find $n=15\times4/5=12.$
So last year, $n$ was $0,$ and the ratio of Canada's age to your age was $k=150/15=10;$ and $11$ years from now, $n$ will be $12,$ and the ratio of Canada's age to your age will be $k=162/27=6.$
*Incidentally, it is not obvious in advance that we will ever get an integer value of $n;$ if this were the case then the problem would simply have no answer. As it happens, the problem does have answers, namely $(n,k)\in\{(0,10),(12,6),(30,4),(120,2)\}.$
A: Alternatively:
$\frac {150 + n}{15 + n} = \frac {150+ 10n}{15+n} +\frac {-9 n}{15+n}$
$=10  -\frac {9 n}{15+n}$ (which is an integer for $n=0$ but when next?)
$=10 - \frac {9n + 9*15}{15+n} + \frac {9*15}{15+n}=$
$=10 - 9 + \frac{3^3*5}{15+n}= 1  + \frac{3^3*5}{15+n}$
which is an integer if $15+n$ is one of the factors of $3^3*5$.
And the factors of $3^3*5$ are $1, 3,9, 27, 5,15, 45, 135$.
So this will occur when $n = -14,-12, -10, -6,0, 12,30, 120$ 
When you are $1, 3, 5, 9, 15, 27, 45, 135$ and canada is $136, 138, 140, 144, 150, 162, 180, 270$ and canada is exactly $136,46, 28, 16, 10,6,4, 2$ as old as you are.
(Enjoy your $45$ birthday when your country annexes my country after we collapse from the thirty year aftermath of the unrecoverable mistakes of the last two years.)
That's a fun problem.  It's nice to see other people like to think about these things.   
A: First thing I would do is say that Canada is $135$ years older than you.
That gives you a simpler
$$\frac {135+n}{n} = k\\
\frac {135}{n} = k-1\\$$
It will happen every time your age is a factor of $135.$
It last happened when you were $15.$ It will next happen when you are $27$
A: You want $\frac{150+n}{15+n}=m$, and clearing denominators gives us
$$150+n=(15+n)m.$$
Subtracting $15+n$ from both sides give us
$$135=(15+n)(m-1).$$
Now you are looking for the smallest $n>1$ for which such an $m$ exists, so the smallest $n>1$ for which $15+n$ divides $135$.
A: Note that if $k \mid a$ and $k \mid b$, then $k \mid a - b$. In this particular instance, we have $15 + n \mid 15 + n$ and $15 + n \mid 150 + n$, so $15 + n \mid 135$. In other words, we are looking for $n+15$ to be the next factor of $135$ which is larger than $15$. Can you continue from here?
A: Servaes answer is excellent but let me add few cents for those who can't really make out something from dual variables and other factors (I know some people have problem with such things).
There is also a brute force solution, requiring a bit of thinking and a bit of simple calculation (the larger is the $n$ i $n$-times larger the more difficult it becomes though so I really suggest you try understanding the accepted solution anyway).
It's enough to check if there is an integer solution to equation
$$\frac{150+n}{15+n}=9$$
If no, proceed with 8, 7 and so on. If you get to 2 and still have no anwser then the answer is never.
So a quick brute force check will like that:
$$\frac{150+n}{15+n}=9$$
$$150+n=9\cdot(15+n)$$
$$150+n=135+9\cdot n$$
$$15=8\cdot n$$
$$n = \frac{15}{8}\notin\mathbb{Z}$$
So we continue with $8$
$$\frac{150+n}{15+n}=8$$
$$150+n=8\cdot(15+n)$$
$$150+n=120+8\cdot n$$
$$30=7\cdot n$$
$$n = \frac{30}{7}\notin\mathbb{Z}$$
You may continue from here. Note, a smart person using this method will notice some pattern that will make it even simpler to test (not requiring all the calculation, just a quick check that literally takes seconds) but I will not give a direct hint.
Explanation
When you add the same number to both numerator and denominator of a fraction, the fraction decreases. In other words if you consider how the fraction of age of Canada and your age changes over time it will decrease.
On the other hand the fraction can never go to $1$ (or below) since the numerator will always be obviously greater than denominator (in our case by 135).
In other words you have a finite set of possible resultant fractions (namely $\{2,3,4,5,6,7,8,9\}$) that are potentially the sought "next case". From those you're looking for the largest one, so test them one by one, starting with $9$ and going down until you have an integer result or your options are gone.
Remarks


*

*Once again - this is a brute force solution and should not be treated as preferred if you can understand using two variables. But if you can't, it's still doable.

*If you notice the relationship I mention above, I guess even testing situation where the initial fraction is 100 could be done.

*You may try solving an interesting opposite question - when was the last time when such situation occurred (i.e. Canadas age was a multiply of your age). If you think it over well, you may use both Servaes and my approaches to that as well. Especially try rationalising that my approach will again have a finite and easily predictable number of tests to be performed.

*A food for thoughts. Is there always a solution to the original question (with differently chosen ages)? Is there always a solution to the problem I state in remark 3?

*Can you think of other related questions that will use similar approach (either Servaes's elegant one or mine brute force) to find a solution?

A: We can rewrite your question as, find all $n$ which supplies $(150+n) = Q\cdot(15+n)$, in terms of divisibility and residue classes:
$$(15 + n) | (150 + n)$$
$$150 +n \equiv_{15+n} 0$$
We can reduce modulo $15 + n$ in the congruence relation since it is clear that $150 + n$ is more than $15 + n$,
$$135 \equiv_{15+n} 0$$
So our problem reduced to looking for all $n$ with the property that $15 + n$ divides $135$. Calculating all distinct factors of $135$ more than or equal to $15$, with the help of prime factorization, we reach the conclusion that all positive values for $n$ are:
$$0, 12, 30, 120$$
