<s>[INST] Find the sum of first $20$ terms of a sequence Define a sequence $$a_n=\sqrt{1+\left(1-\frac{1}{n}\right)^2}+\sqrt{1+\left(1+\frac{1}{n}\right)^2}$$ for $n \geq 1$. Find $$\sum_{i=1}^{20}\frac{1}{a_i}$$ Some insight on the approach is highly appreciated. What is the general way of solving such problems? Thanks.
 [/INST] $$\frac{1}{\sqrt{x}+\sqrt{y}}=\frac{\sqrt{x}-\sqrt{y}}{x-y},$$
so by choosing $x=1+\left(1+\frac{1}{n}\right)^2$, $y=1+\left(1-\frac{1}{n}\right)^2$ we have:
$$ \frac{1}{a_n} = \frac{n}{4}\left(\sqrt{1+\left(1+\frac{1}{n}\right)^2}-\sqrt{1+\left(1-\frac{1}{n}\right)^2}\right) $$
or:
$$ \frac{1}{a_n} = \frac{1}{4}\left(\sqrt{n^2+(n+1)^2}-\sqrt{n^2+(n-1)^2}\right) $$
and our sum turns out to be a telescopic one:
$$ \sum_{n=1}^{20}\frac{1}{a_n}=\frac{1}{4}\left(\sqrt{20^2+21^2}-1\right)=\bbox[5px,border:2px solid #C0A000]{\color{red}{7}}$$
</s>