Is this the general solution to $m\mid n^2+n, n\mid m^2+m$?
I saw this problem in this Michael Penn video:
https://www.youtube.com/watch?v=0J1ByEhwHRU
Here is my solution (which is very different than the solution in the video):
Let $uv=c^2+1$. Then $m=c(u+c), n=c(v+c) $.
My question:
Are these the general solutions?
Note: all variables are positive integers.
Verification:
$\begin{array}\\ m^2+m &=m(m+1)\\ &=c(u+c)(c(u+c)+1)\\ &=c(u+c)(cu+c^2+1)\\ &=c(u+c)(cu+uv)\\ &=cu(u+c)(c+v)\\ &=nu(u+c)\\ n^2+n &=n(n+1)\\ &=c(v+c)(c(v+c)+1)\\ &=c(v+c)(cv+c^2+1)\\ &=c(v+c)(cv+uv)\\ &=cv(v+c)(c+u)\\ &=mv(v+c)\\ \end{array} $
In Thomas Andrews' answer, using $c=\gcd(m,n)$ so $m=cm_0$ and $n=cn_0$ with $\gcd(m_0,n_0)=1$, there's the result, for $m_0\neq n_0$, of
$$m_0n_0\mid (m_0+n_0)c+1 \tag{1}\label{eq1A}$$
Also, since $m_0$ and $n_0$ are coprime, then $m_0=n_0$ means they're both $1$, so \eqref{eq1A} holds in that case as well. This equation shows that, for some integer $k \ge 1$, we have
$$\begin{equation}\begin{aligned} (m_0+n_0)c+1 & = km_{0}n_{0} \\ kcm_0 + kcn_0 + k & = k^{2}m_{0}n_{0} \\ c^2 + k & = k^{2}m_{0}n_{0} - kcm_0 - kcn_0 + c^2 \\ c^2 + k & = (km_0 - c)(kn_0 - c) \end{aligned}\end{equation}\tag{2}\label{eq2A}$$
Your result is a special case with $k = 1$. A more general solution is for any $k \ge 1$ where
$$uv = c^2 + k \tag{3}\label{eq3A}$$
so using $u = km_0-c$ and $v=kn_0-c$ in \eqref{eq2A}, we require $k \mid u+c$ and $k \mid v+c$. Then
$$m = \frac{c(u+c)}{k}, \; n = \frac{c(v+c)}{k} \tag{4}\label{eq4A}$$
is a solution. Similar to what you did, the verification is
$$\begin{equation}\begin{aligned} m^2 + m & = m(m + 1) \\ & = \left(\frac{c(u+c)}{k}\right)\left(\frac{c(u+c)}{k}+1\right) \\ & = \frac{c(u+c)(c(u+c)+k)}{k^2} \\ & = \frac{c(u+c)(cu+c^2+k)}{k^2} \\ & = \frac{c(u+c)(cu+uv)}{k^2} \\ & = \frac{uc(u+c)(c+v)}{k^2} \\ & = \left(\frac{c(c+v)}{k}\right)\left(\frac{u(u+c)}{k}\right) \\ & = n\left(\frac{u(u+c)}{k}\right) \end{aligned}\end{equation}\tag{5}\label{eq5A}$$
Since $k\mid u+c$, then $\frac{u(u+c)}{k}$ is an integer. We can also similarly verify that $n^2+n = m\left(\frac{v(v+c)}{k}\right)$.
As indicated in Thomas Andrews' comment, with $k = 2$, then for every odd $c$, since $c^2 + k$ is odd, then all factors $u$ and $v$ are as well, so $k$ always divides $u+c$ and $v+c$. Also, this produces results not obtainable using $k=1$, with the first such one being $(c,k,u,v)=(1,2,3,1)$ giving $(m,n)=(2,1)$.
For each larger $k$, since $1$ is always a factor, then any positive $c \equiv -1 \pmod{k}$ works by choosing $u = 1$ and $v = c^2 + k$. For $k = 2$, using the odd factors $u$ and $v$ of $c^2 + 2$ for any odd $c$ comprise all of the solutions while, for $k \gt 2$, there are also many other $c$, $u$ and $v$ which work, especially for smaller $k$ values.
Also, for any $k$ where there's a solution of $c$ with $k \gt 2c + 1$, then there's also at least one $c_1 \gt c$ and $0 \lt k_1 \lt k$ where $c^2 + k = c_1^2 + k_1$ (at times also including the OP's result of $k_1 = 1$), so some solutions may be repeated.