Prove that there are integers $n$ such that $\sqrt 2[f(1) + \cdots + f(n)] \in \mathbb Z$, $f(x) = \sqrt{1 - \frac{1}{2x^2 + \sqrt{4x^4 + 1}}}$. 
Define function $f(x)$ as followed $$\large f(x) = \sqrt{1 - \dfrac{1}{2x^2 + \sqrt{4x^4 + 1}}}, \forall x \in \mathbb Z^+$$. Prove that there are infinitely many positive integers $n$ such that $$\large \sqrt 2[f(1) + f(2) + \cdots + f(n - 1) + f(n)] \in \mathbb Z^+$$

Let $g(x) = f(1) + f(2) + \cdots + f(n - 1) + f(n)$
We have that $$\sqrt{1 - \dfrac{1}{2x^2 + \sqrt{4x^4 + 1}}} = \sqrt{1 + 2x^2 - \sqrt{4x^4 + 1}} = \frac{\sqrt{2x^2 + 2x + 1} - \sqrt{2x^2 - 2x + 1}}{\sqrt 2}$$
Furthermore, we have that $2(n + 1)^2 - 2(n + 1) + 1 = 2n^2 + 2n + 1, \forall n \in \mathbb Z^+$
$$ \implies g(n) = f(1) + f(2) + \cdots + f(n - 1) + f(n) = \frac{\sqrt{2n^2 + 2n + 1} - \sqrt{2 \cdot 1^2 - 2 \cdot 1 + 1}}{\sqrt 2}$$
$$ \implies \sqrt{2} \cdot g(n) = \sqrt{2n^2 + 2n + 1} - 1$$
I'm not sure if my solution is incorrect or there is anything wrong with the problem.
 A: You have done great so far.  Now note that $$2n^2+2n+1=n^2+(n+1)^2,$$ so you just need an infinite family of Pythagorean triplets of the form $(n,n+1,m)$. But if $(n,n+1,m)$ works, then $$(3n+2m+1,3n+2m+2, 4n+3m+2)\ \ \ \ \ (1)$$ also works.
Here is how to get the triplet (1).  Let $2n^2+2n+1=m^2$.  Then
$$(2n+1)^2-2m^2=2(2n^2+2n+1-m^2)-1=-1.$$
Thus $(2n+1,m)$ satisfies the following Pell-type equation: $$x^2-2y^2=-1.\ \ \ \ \ (2)$$  All integer solutions $(x,y)$ to (2) are known and they are given by
$$|x|+\sqrt{2}|y|=(1+\sqrt{2})^{2k+1}$$
for some non-negative integer $k$.  But let's not bother with that.  Observe that if $(x,y)$ is a solution to (2), then $(x',y')$ is again a solution where
$$x'+\sqrt{2}y'=(1+\sqrt{2})^2(x+\sqrt{2}y)=(3+2\sqrt2)(x+\sqrt2y).$$
So $(x,y)=(2n+1,m)=\big(n+(n+1),m\big)$ gives
$$(x',y')=(6n+4m+3,4n+3m+2)=\big((3n+2m+1)+(3n+2m+2),4n+3m+2\big).$$
In fact for a non-negative integer $n$, $\sqrt2 g(n)$ is an integer if and only if $n=n_k$ where
$$n_k=\frac{(1+\sqrt2)^{2k+1}-2+(1-\sqrt{2})^{2k+1}}{4},$$
for some non-negative integer $k$.  We have $n_0=0$, $n_1=3$, and
$$n_{k+2}=6n_{k+1}-n_k+2.$$
So $n_2=20$ and $n_3=119$ for example.  The corresponding $m_k$ to $n=n_k$ (i.e., $g(n_k)=m_k-1$) is
$$m_k=\frac{(1+\sqrt2)^{2k+1}-(1-\sqrt2)^{2k+1})}{2\sqrt{2}},$$
which can be obtained from the following recursion: $m_0=1$, $m_1=5$, and
$$m_{k+2}=6m_{k+1}-m_k.$$
You can also compute $g_k=g(n_k)$ directly from the recursion $g_0=0$, $g_1=4$, and
$$g_{k+2}=6g_{k+1}-g_k+4.$$
