# Proving a Pellian connection in the divisibility condition $(a^2+b^2+1) \mid 2(2ab+1)$

I'm trying to prove that all integer solutions $a > b \ge 0$ to the divisibility condition in the title, namely $$(a^2+b^2+1) \mid 2(2ab+1),$$ are given by $$(a,b)=(1,0),(4,1),(15,4),(56,15),(209,56),\dots$$ where $a_n$ is in http://oeis.org/A001353, and $b_{n+1}=a_n$. This sequence is related to the Pell equation $x^2-3y^2=1$, in that the sequence $0,1,4,15,56,\dots$ give the $y$ values in the solutions $(x,y)$.

Related MSE posts of possible interest include Proving there are an infinite number of pairs of positive integers $(m,n)$ such that $\frac{m+1}{n}+\frac{n+1}{m}$ is a positive integer and Conjecture on integer solutions to the equation $(ab + 1) \mid (a^{2}+b^{2})$. Vieta jumping doesn't seem to apply (since it's best used to derive a contradiction, or prove a constant value). Any help/pointers would be appreciated.

At a quick glance, Vieta jumping still applies. Note that your consecutive solution pairs share a common term e.g. $(1,4) \rightarrow (4, 15)$. This strongly hints that we do apply Vieta's, and in fact the standard Vieta's jumping argument leads to your conclusion.

For $a > b \geq 0$, we have $a^2 + b^2 + 1 > 2ab + 1$. Hence, $\frac{ 2(2ab+1) } { a^2 + b^2 + 1} < 2$, which tells us that divisibility is satisfied only when

$$a^2 + b^2 + 1 = 2 (2ab+1).$$

Now, observe that if $(a,b)$ is a solution, then by Vieta's jumping, so is $(4a-b, b)$ and $(b, 4b-a)$.

You can verify that this leads to the same solution set of Pell's equation, because they both satisfy the same underlying recurrence of consecutive terms, namely $y_{n+2} = 4 y_{n+1} - y_n$.

Your link does not like me. Solutions for hard to find such equations. So easy.

the equation: $\frac{m+1}{n}+\frac{n+1}{m}=a$

Can be solved using the equation Pell:

$p^2-(a^2-4)s^2=1$

Solutions have the form:

$n=2(p-(a+2)s)s$

$m=-2(p+(a+2)s)s$

Solutions have the form:

$n=\frac{2p(p+(a-2)s)}{a-2}$

$m=\frac{2p(p-(a-2)s)}{a-2}$

If there is a solution of the following equation Pell: $p^2-(a^2-4)s^2=4$

We use its solutions and the formula is:

$n=\frac{p-(a-2)s+2}{2(a-2)}$

$m=\frac{p+(a-2)s+2}{2(a-2)}$

To solve the equation in general form: $\frac{X^2+aX+Y^2+bY+c}{XY}=j$

In the case where a square:

$t=\sqrt{(b+a)^2+4c(j-2)}$

We use the solutions of Pell's equation:

$p^2-(j^2-4)s^2=1$

Solutions can be written.

$X=\frac{(b+a\pm{t})}{2(j-2)}p^2+(t\mp{(b-a)})ps-\frac{(b(3j-2)+a(6-j)\mp{(j+2)t})}{2}s^2$

$Y=\frac{(b+a\pm{t})}{2(j-2)}p^2+(-t\mp{(b-a)})ps-\frac{(b(6-j)+a(3j-2)\mp{(j+2)t})}{2}s^2$

It must be remembered that the numbers $p,s$ may be any mark.