6. If $n$ is a natural number, the $n$-th triangular number is $T_{n}=1+$ $2+\cdots+n$. Find all values of $n$ for which the product of the 16 consecutive triangular numbers $T_{n} T_{n+1} \cdots T_{n+15}$ is a perfect square.
Solution. Since $T_{n}=n(n+1) / 2$, the product of the 16 triangular numbers is $P_{n}=n C_{n}(n+16) / 2^{16}$, where $C_{n}=(n+1)^{2} \ldots(n+15)^{2}$ is a perfect square. Then $P_{n}$ is a perfect square if and only if $n(n+16)$ is. Since $n$ and $n+16$ do not have common odd divisors, for $n(n+16)$ to be a perfect square, the odd primes that divide $n$ and $n+16$ must appear with an even exponent, so we can write $n=2^{a} m^{2}$ and $n+16=2^{b} t^{2}$ with $a, b=0$ or 1. Furthermore, $n$ and $n+16$ have the same parity, so $a=b=0$ or $a=b=1$. In the first case $t^{2}=m^{2}+16$ and it can only be $m=3, t=5$ (with $m \geq 7$ there can be no solutions because the difference of two distinct squares $\geq 49$ is greater than $16 \mathrm{y}$, and with $m \leq 6$, there is only the indicated solution), so $n=9 \mathrm{y}$ $n(n+16)=9 \times 25$, which is a square. In the case $a=b=1$, it results $t^{2}=m^{2}+8$, whose only solution is $m=1, t=3$, which corresponds to $n=2$, a value for which $n(n+16)=36$ is a square. The answer is therefore $n=2$ and 9.