Let
$$ m=9n^3+30n^2-9n $$
where $n \in \mathbb{Q^{+}}$ and $m \in \mathbb{Z} $ . Find all solutions which satisfy the given conditions.
I thought oh, there is probably an infinite amount of solutions but anyways I jumped in to see.
Since $m \in \mathbb{Z} $, I started with the easiest case ever $m=0$
$$ 0=9n^3+30n^2-9n $$ $$ 0=3n(3n^2+10n-3) $$
but then I realized, if $m,n \in \mathbb{Z} $ then basically there is a lot of solutions.
I'm more interested in the case where $n \in \mathbb{Q^{+}-Z} $ but $m \in \mathbb{Z} $. I'm not sure if I'm interpreting right but that basically means that $n$ must be rational and the output which is $m$ must be an integer but how would one solve that?
Let $n=\frac{p}{q}$ with $gcd(p,q)=1$.
Then we want $\dfrac{9p^2+30pq-9q^2}{q^3}$ to be an integer.
This implies that $q$ must divide $9p^2$, hence $q$ divides 9.
If $q=3$, then we want $p^2+10p-9$ to be divisible by 3, which happens for any $p=2$ mod 3.
If $q=9$, then we want 81 to divide $p^2+30p$ and hence divide $p+30$, so this happens for $p=6$ (mod 9).