Integer solutions to $k^2m^2 -k^2 - m^2 +1 = n^2$ Can the positive integer solutions to 
$$
k^2m^2 -k^2 - m^2 +1 = n^2
$$
be characterized (in the sense that the solutions to $a^2+b^2 = c^2$ are characterized by  $a=r^2-s^2, b=2rs, c=r^2+s^2$ with $(r,s)=1$ and $r\neq s \mod 2$)?
Beyond than the obvious solutions with one of $k=m$, the seqeunce of solutions for $k=2$ starts with $m = 2, 7, 26, 97, 362 \ldots$; for $k=3$ it starts with $m=3, 17, 99, 373, \ldots$ and for $k=4$ it starts with $m=4, 31, 244, 307 \ldots$ 
Being a 4-th order Diophantine equation, this may be hard; but the form is so simple that I have hopes. I suspect the set of solutions is infinite, and that (much stronger) even for a given value of $k$ there are infinite solutions, but I don't know how to go about proving either of these.
 A: Rewrite our equation as $(k^2-1)(m^2-1)=n^2$. 
We only  show that there are infinitely many non-trival solutions. Consider a Pell equation, such as $x^2-2y^2=1$ or $x^2-3y^2=1$, say the first.
There are infinitely many solutions of the equation $x^2-2y^2=1$. Let $(k,s)$ and $(m,t)$ be distinct solutions. Then $(k^2-1)(m^2-1)=4s^2t^2$, a perfect square.  
Added: Let $k\ge 2$ be fixed. Note that $(k,1)$ is a solution of the Pellian $x^2-(k^2-1)y^2=1$. This equation has infinitely many solutions, and therefore, by the argument above, there are infinitely many $m$ such that $(k^2-1)(m^2-1)$ is a perfect square. 
A: We can characterize all solutions, and show that there exist infinitely many for all $k\neq 0$.
Fix $k$, and write $k^2-1 = a^2b$, where $b$ is square-free, so our equation becomes $a^2 b (m^2-1)=n^2$.  Then $n^2 \equiv 0 \pmod{a^2 b}$, so $ab \mid n$.
Setting $t=\frac{n}{ab}$, we can rewrite our equation as $m^2-bt^2=1$, which is a Pell's equation known to have infinitely many solutions (note: $b\neq 1$, because $k^2-1$ cannot be a square).  There are many known descriptions of these solutions, any of which give a complete characterization of the solutions to your equation for fixed $k$.
A: It is clear that in equation: $$k^2m^2-k^2-m^2+1=n^2$$
Decisions are determined by the solutions of the Pell equation:
$$p^2-(k^2-1)s^2=1$$
We need to write a formula that clearly shows what was the substitution desired.  Will make a replacement.
$$x=2(k+1)ps\pm(p^2+(k^2+1)s^2)$$
$$y=2(k-1)ps\pm(p^2+(k^2-1)s^2)$$
Then the solutions are of the form:
$$m=\frac{(k+1)y^2+(k-1)x^2}{2}$$
$$n=(k^2-1)yx$$
It is necessary to consider another solution. In known solutions $x,y,p,s$ - to find their counterparts. Upon substitution into the formula they give solutions. Are they using the formula.
$$x_2=x+2p((k+1)ys-px)$$
$$y_2=y+2(k-1)s((k+1)ys-px)$$
We must be careful that the signs not to confuse them.
The Pell Equation:  $p^2-(k^2-1)s^2=1$
Is very simple. And for the first solution:  $p=k$  ;  $s=1$
You can find the rest by the formula:
$$s_2=p_1\pm{ks_1}$$
$$p_2=kp_1\pm{(k^2-1)s_1}$$
$s_1$ ; $p_1$ - any previous solution of the Pell equation.
