# A Diophantine rational function [closed]

For how many integers $$N$$ is the rational function $$\frac{N^2-2N-15}{N^2-N-12}$$ also an integer?

## closed as off-topic by greenturtle3141, Brandon_J, gabbo1092, Gamow, GlorfindelJun 6 at 19:53

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." – greenturtle3141, Brandon_J, gabbo1092, Gamow, Glorfindel
If this question can be reworded to fit the rules in the help center, please edit the question.

• I don't think this is off-topic. The "obvious" way to approach this would be to write $N^2−2N−15=M(N^2−N−12)$ and then try to reduce possibilities for $M$ and $N$, perhaps by using modular arithmetic or even brute-forcing. The "aha moment" required by the linked policy is to factorise the polynomials, and the "unexpected result" is that only two values of $N$ work and it's easy to find which ones. – Rand al'Thor Jun 7 at 13:02

Since the given expression can be simplified to

$$\frac{(N-5)(N+3)}{(N-4)(N+3)}=\frac{N-5}{N-4}=1-\frac{1}{N-4}$$,

we simply need to make sure

$$N-4$$ divides $$1$$, i.e., $$N-4=\pm 1$$, which leads to $$N=5$$ or $$N=3$$. We can check that both of them work.

So

There are two such $$N$$.

• Perfect! I was hoping to lead people on a wild goose chase with $N^2-2N-15=M(N^2-N-12)$ or suchlike, but you're too good. – Rand al'Thor Jun 6 at 10:09