$$ n(n+1) = \underbrace{n^2 + n = \left(n^2+n+\frac 1 4\right) - \frac 1 4}_{\text{completing the square}} = \left( n + \frac 1 2 \right)^2 - \frac 1 4 $$

The reason for multiplying by $4$ is so that only integers will appear in the line above.

$$ 4n(n+1) = \underbrace{4n^2 + 4n = \left(4n^2+4n+1\right) - 1}_{\text{completing the square}} = (2n+1)^2 - 1 $$


He multiplies it by $4$ so as to simplify the condition $\frac{n(n+1)}{2}=m^2$ to a simpler condition, involving a quadratic term on the left hand side (since there is a quadratic term on the right hand side, too). This allows us to complete the square (and also makes the equation "look good").

To proceed from your work, multiply both the sides by $4$ and then following the book's solution: $$4\times(n^2+n)=4\times(2m^2)$$ The condition is achieved simply by moving $1$ to the right hand side and by moving $8m^2$ to the left hand side.


The $m$th square number is equal to the $n$th triangular number if
$m={{\left(3+2\sqrt 2\right)^u-\left(3-2\sqrt 2\right)^u}\over{4\sqrt 2}}$ and $n={{\left(3+2\sqrt 2\right)^u-2+\left(3-2\sqrt 2\right)^u}\over 4}$.
For each integer value of the index $u$ — positive, zero or negative — there is such a pair.
If $m_0=0$ and $m_1=1$, then $m_u=6m_{u-1}-m_{u-2}=6m_{u+1}-m_{u+2}$.
If $n_0=0$ and $n_1=1$, then $n_u=6n_{u-1}-n_{u-2}+2=6n_{u+1}-n_{u+2}+2$.


As the other answers have explained, the multiplication by 4 is to make things neater. However, on closer look, the formulation (2n+1)^2 - 1 = 8m^2 doesn't really simplify the situation. This is because (2n+1), an odd number, when squared, will always be one more than [8 times a triangular number]. This formulation simply restates the problem: when is m^2 a triangular number.

The way I have gone about this problem is to state it as follows: n(n+1) = 2m^2

n and (n+1) can share no common factors. Since all the prime factors except 2 on the RHS are raised to an even power, one of (n) and (n+1) must be a square and the other 2 times a square. The situation now becomes: a^2 = 2b^2 +- 1

To illustrate, the first triangular and square number after 1 is 36, because: 3^2 = 2*2^2 + 1

The series of 'square triangulars' can be found by finding all a-b pairs which fulfil the above equation. The first few pairs are: (1,1); (3,2); (7,5); (17,12). These yeild the square triangular numbers: 1, 36, 1225, 41616.

An infinite series of these pairs can be generated as follows: take one pair; (a,b) the next pair is (a+2b, a+b)