Integer solutions of $n^2+n = 2x^2+2x$

206 Views Asked by At

I know that the integers solutions of the equation: $$ n^2+n = 2x^2+2x $$ are

$$n = \frac{1}{4} (-(3 - 2 \sqrt{2})^m - \sqrt{2} (3 - 2 \sqrt{2})^m - (3 + 2 \sqrt{2})^m + \sqrt{2} (3 + 2 \sqrt{2})^m + 2),$$ $$x = \frac{1}{8} (2 (3 - 2 \sqrt{2})^m + \sqrt{2} (3 - 2 \sqrt{2})^m + 2 (3 + 2 \sqrt{2})^m - \sqrt{2} (3 + 2 \sqrt{2})^m + 4),$$

$m \in \mathbb{Z}, m\ge0$

but I don't understand how.

Someone can point me in the right direction to solve this problem.

2

There are 2 best solutions below

0
On BEST ANSWER

One way is to set $m=2n+1$ and $y=2x+1$ and get the equivalent Pell equation $m^2=2y^2-1$.

The fundamental solution is $m=1, y=1$ and the general solution comes from the odd powers of $1+\sqrt2$. You go from one solution to another by multiplying by $(1+\sqrt2)^2=3+2\sqrt2$. This gives $$ \pmatrix{ m_{k+1} \\ y_{k+1}} = \pmatrix{ 3 & 4 \\ 2 & 3} \pmatrix{ m_{k} \\ y_{k}}, \qquad \pmatrix{ m_{0} \\ y_{0}} =\pmatrix{ 1 \\ 1} $$ whose eigenvalues are $3 \pm 2 \sqrt2$. The general solution is a linear combination of powers of these eigenvalues.

You can avoid eigenvalues etc by considering the powers of $1-\sqrt2$, which helps extract both parts.

1
On

This is a step by step guide. As it says above complete the square, and put into a pell-equation format:

$$n^2+n+\frac{1}{4}-\frac{1}{4}=2\bigg(x^2+x+\frac{1}{4}\bigg)-\frac{1}{2}$$ $$\implies$$ $$1=2(2x+1)^2-(2n+1)^2$$

Make your substitutions $y=2x+1$ and $m=2n+1$.
Observe that $$1=1^2=(2-1)^2=\left[(\sqrt2-1)(\sqrt2+1)\right]^2=(3-2\sqrt2)(3+2\sqrt2)$$ This will be used to the put pell equation into an equivalent version: $$ \begin{align} 1&=2y^2-m^2 \\ 1&=(y\sqrt2-m)(y\sqrt2+m) \\ 1=1\cdot1^2&=(y\sqrt2-m)(3-2\sqrt2)(y\sqrt2+m)(3+2\sqrt2) \\ 1&=[(3y+2m)\sqrt2-(4y+3m)][(3y+2m)\sqrt2+(4y+3m)] \\ 1&=2(3y+2m)^2-(4y+3m)^2=2y^2-m^2 \end {align}$$ Here we use one solution to the pell equation to generate another. Taking from the last line:

$$\begin{align} \begin{cases} y_{k+1}&=3y_{k}+2m_{k} \qquad &(1) \\ m_{k+1}&=4y_{k}+3m_{k} \qquad &(2) \end{cases} \end{align}$$

To solve this system, start by eliminating $m_{k}$:

$$\implies 3y_{k+1}-2m_{k+1}=y_{k}$$

Step the recurrence down, $$\implies 3y_{k}-2m_{k}=y_{k-1}$$ Substitute for $2m_{k}$ from $(1)$ $$\implies 3y_{k}-(y_{k+1}-3y_{k})=y_{k-1}$$ $$y_{k+1}-6y_{k}+y_{k-1}=0$$ Step back up, and here you have a second order linear recurrence relation in just one variable: $$y_{k+2}-6y_{k+1}+y_{k}=0$$ Do the same for $m$ and you get the same thing.
$$m_{k+2}-6m_{k+1}+m_{k}=0$$ Although it's the same recurrence relation the second values differ, $y_2=5$ whereas $m_2=7$, producing different sequences for $y$ and $m$.

There's a historical "guess" that solves this type of recurrence. You "guess" that $y=\lambda^k$. $$\lambda^{k+2}-6\lambda^{k+1}+\lambda^k=0$$ Let's assume $\lambda\neq0$, then divide through by $\lambda^k$: $$\lambda^2-6\lambda+1=0$$ Leads us to $$\lambda_1=3+2\sqrt2$$ $$\lambda_2=3-2\sqrt2$$ We use this to update our guess to something in the span of $\lambda_1^k$ and $\lambda_2^k$:

$$y_k=A\cdot\lambda_1^k+B\cdot\lambda_2^k$$

And we can find out what $A$ and $B$ are by using the first and second solution to $2y^2-m^2=1$ which are $(1,1)$ and $(5,7)$; we can let $y_0=1$ and $y_1=5$, thus:

$$\begin{cases} A+B=1 \\ A\cdot \lambda_1 + B \cdot \lambda_2 = 5 \end{cases}$$

Using matrix notation, we have that

$$\left(\begin{array}{cc|c} 1&1&1\\ \lambda_1 & \lambda_2 & 5 \end{array}\right) \sim \left(\begin{array}{cc|c} 1 & 0 & \frac{5-\lambda_2}{\lambda_1 - \lambda_2}\\ 0 & 1 & \frac{\lambda_1 - 5}{\lambda_1 - \lambda_2} \end{array}\right)$$

Thus $$A=\frac{5-\lambda_2}{\lambda_1 - \lambda_2}=\frac{2+\sqrt2}{4}$$ $$B=\frac{\lambda_1 - 5}{\lambda_1 - \lambda_2}=\frac{2-\sqrt2}{4}$$

Repeat the process for m, finding the $A$ and $B$ for $m$, and our second order recurrences have been solved:

$$y_k=\frac{2+\sqrt 2}{4} \cdot (3+2 \sqrt 2)^k + \frac{2 - \sqrt 2}{4} \cdot (3 - 2 \sqrt 2)^k$$

$$m_k=\frac{1+\sqrt 2}{2} \cdot (3+2 \sqrt 2)^k + \frac{1 - \sqrt 2}{2} \cdot (3 - 2 \sqrt 2)^k$$

Our original substitutions were $y=2x+1 \land m=2n+1 \implies x_k = \frac{y_k - 1}{2} \land n_k=\frac{m_k - 1}{2}$ finally leading us to

$$x_k=\frac{1}{2}\left[\left(\frac{2+\sqrt 2}{4} \cdot (3+2 \sqrt 2)^k + \frac{2 - \sqrt 2}{4} \cdot (3 - 2 \sqrt 2)^k\right)-1\right]$$

$$n_k=\frac{1}{2}\left[\left(\frac{1+\sqrt 2}{2} \cdot (3+2 \sqrt 2)^k + \frac{1 - \sqrt 2}{2} \cdot (3 - 2 \sqrt 2)^k\right)-1\right]$$

You can see that this is the form you were going for in the beginning.