TITLE: Ratio of triangular numbers
QUESTION [18 upvotes]: Which natural numbers can be written as the ratio of two triangular numbers?
That is, which natural numbers can be written as
$$\frac{n(n+1)}{m(m+1)}$$ for natural numbers $m,n$.

REPLY [3 votes]: A small complement to the nice answers so far: there are infinitely many squares that are not the ratio of two triangular numbers. 
Indeed, with Gjergji Zaini's notation, let $k=p+1$, where $p\equiv 3\pmod{4}$ is a prime. Then the equation
$$k^2-1=(ky-x)(ky+x)$$
becomes
$$p(p+2)=((p+1)y-x)((p+1)y+x).$$
The first factor on the right is at most $p$, hence if $p$ divides this factor, then the factors on the right are $p$ and $p+2$, so that $y=1$, which corresponds to $n=0$. If $p$ divides the second factor on the right, then the factors on the right are $q$ and $pr$ such that $qr=p+2$. Now
$$q-r\equiv q+pr=2(p+1)y\equiv 0\pmod{p+1},$$
hence $|q-r|\geq p+1$, which forces $q=1$ and $r=p+2$ (since $1\leq q\leq p$). In other words, the factors on the right are $1$ and $p(p+2)$, so that $y=(p+1)/2$. The last expression is even, hence it does not correspond to any $n$.