So here is the problem.

First of all, we need to know what a triangular number (aka triangle number) is. A triangular number is the number count of dots which forms an equilateral triangle such as the diagram below.

Or basically the *n*th triangular number is the sum of the natural numbers from 1 to *n*. Some people will define the zeroth triangular number as zero. And the formula for the *n*th triangular number can be easily defined as the following.

An interesting fact about triangular number is that the number 666 is one of them. Why? because 666 = 2 **·** 3 **·** 3 **·** 37 = 18 **·** 37. which is 36 **·** 37 / 2, so 666 is the 36th triangular number. And if you switch the number 36 to 63. The 63rd triangular number is 2016. That’s why I want to write something about triangular number three years ago but I didn’t have the time back then too busy taking care of my baby girl. Anyway let’s go back to what I want to do today. I want to find two triangular numbers such that one is twice another one. Since the devil number 666 is one of them, let’s list out all triangular numbers up to 666.

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, …

At first glance, the pair of 3 and 6 stands out right away. Now the question is can we find another pair? Without much trouble, 105 and 210 can be picked out quite easily from the above list. Can we find more? Consider the following. For natural number *m* and *n*,

Multiplied both sides by 8,

Let and , we have

which is a classical Pell’s equation of the form . Since it is negative one, some people prefer to call it the negative Pell’s equation or the anti-Pell’s equation. To solve this equation, we can use continued fraction. I am not going to explain what continued fraction is because that will be too long and one can always find the explanation on Wikipedia or in any elementary number theory books. Maybe later when I have the mood I will write something on continued fraction coz I think continued fraction is a better way to represent a real number than the decimal expansion representation we are normally using. For instance, the number 1/3 can not be expressed as a terminating decimal but in continued fraction it can be written as [0; 3]. For irrational number such as root 2, it is approximately equal to 1.414213562… which I need to use a calculator to evaluate plus the decimals are non-repeating. But root 2 can be written as an exact form by using continued fraction with a repeating pattern [1;2,2,2,2,2, …].

Anyway let me solve the anti-Pell’s equation

First I need to find the continued fraction of root 2.

Note that continued fraction is denoted as

So in our case here,

Next, we can find the kth convergent of root 2. The kth convergent of the continued fraction has the value

and the values of the numerators and denominators can be defined as follows.

It is straightforward to prove this by math induction.

To proceed further, we need the following theorem.

**Theorem.** Let be a positive integer that is not a perfect square. Let denote the *k*th convergent of the simple continued fraction of . Let be the period length of this continued fraction. Then, when is even, the positive solutions of the Pell’s equation are , and the anti-Pell’s equation has no solution. When is odd, the positive solutions of the Pell’s equation are , and the solutions of the anti-Pell’s equation are .

The proof is quite long so I am too lazy to type them all out.

Let me list out the numerators and the denominators of the kth convergent of the infinite simple continued fraction of for by using the recursive formula for and defined earlier.

Since , the period *n* = 1 is odd, then by the theorem, we have the index for *p* and *q* being equal to which are 0, 2, 4, 6, 8, …, all the even convergents. So the solutions are

Since and , then and , hence,

The first pair (0,0) implies that zeroth triangular number is twice the zeroth triangular number (if you accept zero as the zeroth triangular number). And the rest are:

(3, 2) implies that 3rd triangular number is twice the 2nd triangular number.

(20, 14) implies that 20th triangular number is twice the 14th triangular number.

(119, 84) implies that 119th triangular number is twice the 84th triangular number.

(696, 492) implies that 696th triangular number is twice the 492nd triangular number.

etc.

In conclusion, since is irrational and the infinite simple continued fraction of is periodic, there are infinitely many *k*th convergents of . Therefore, there are infinitely many pairs of triangular numbers that one is twice another one.

QED.