Integral intersections between quadratic sequences

175 Views Asked by At

How can I find the integer solutions to:

$$ x^2=\frac{1}{2} n (n+1) $$

By brute force I have found the solutions (6,8) (35,49) and (204,288) but then it gets harder.

Note that the perfect squares are the sums of the odd natural numbers, whereas the expression on the right is the sum of all natural numbers, so the problem is to find the values where these two sequences intersect.

3

There are 3 best solutions below

0
On BEST ANSWER

As mathlove commented, the answer in terms of a recursion is Sloane sequence 1109:

$$ x = f(n) = 6*f(n-1) - f(n-2) :: f(0)=0, f(1)=1. $$

Once $x$ is known, the triangular numbers which are perfect squares can be computed by the quadratic formula.

1
On

$x^2 - 8y^2 -1 = 0$

by Dario Alejandro Alpern

$X0 = -1$
$Y0 = 0$

and also:
$X0 = 1$
$Y0 = 0$

If $(x,y)$ is a solution, $(-x,-y)$ is also a solution.

$Xn+1 = P Xn + Q Yn$
$Yn+1 = R Xn + S Yn$

P = 3
Q = 8
R = 1
S = 3

0
On

Rewrite as $2x^2=n^2+n$

Multiply by $4$ to obtain $8x^2=4n^2+4n$

Set $y=2x, z=2n+1$ and confirm $2y^2=z^2-1$ or $z^2-2y^2=1$, which is a Pell Equation. To solve the original problem you need solutions to the Pell equation with $y$ even.

Now note the factorisation $(z+y\sqrt 2)(z-y\sqrt 2)=1$ where the factors differ only in the sign of $\sqrt 2$.

The same is true of $(3+2\sqrt 2)(3-2\sqrt 2)=1$. Note: this is obtained by squaring $(1+\sqrt 2)(1-\sqrt 2)=-1$, but you want solutions for $+1$ only.

Note next that $(z+y\sqrt 2)(3+2\sqrt 2)=(3z+4y)+(2z+3y)\sqrt 2$, and we have $$(3z+4y)^2-2(2z+3y)^2=9z^2+24yz+16y^2-8z^2-24yz-18y^2=z^2-2y^2=1$$

So if $(z,y)$ is a solution of the Pell equation, so is $(3z+4y,2z+3y)$. If $y$ is even, so is $2z+3y$. Given a solution, you can find another.

Using $(z+y\sqrt 2)(3-2\sqrt 2)=(3z-4y)+(3y-2z)\sqrt 2$ you can find descending solutions, which is a help in showing whether you have all the solutions or not.

There is much to learn about Pell Equations and their solutions, but playing with the ideas here (you get two things multiplied together equal to $1$ - such things are called units - and the product of two units is also a unit) will help you when you meet the same ideas in other contexts.