proof that the pattern exists for all n Explain the pattern 
$$(\sqrt2-1)^1= \sqrt2 - \sqrt1$$
$$(\sqrt2-1)^2 = \sqrt9 - \sqrt8$$    
$$ (\sqrt2-1)^3   = \sqrt{50} - \sqrt{49} $$     
that is $(\sqrt2-1)^n$  is  equal to difference of two consecutive numbers one of which are squares.
 A: We will prove a stronger result that $(\sqrt{2}-1)^{2n}=\sqrt{x_n^2}-\sqrt{2y_n^2}$ for some $x_n, y_n$ where $x_n^2-2y_n^2=1$, and $(\sqrt{2}-1)^{2n-1}=\sqrt{2z_n^2}-\sqrt{w_n^2}$ for some $z_n, w_n$ where $2z_n^2-w_n^2=1$ (here $\{x_n\}, \{y_n\}, \{z_n\}, \{w_n\}$ are all increasing sequences of positive integers such that $x_1=3, y_1=2, z_1=1, w_1=1$.)
$n=1$ case is trivial, so suppose that the result holds for $n$. Then we have $(\sqrt{2}-1)^{2n+1}=(\sqrt{2z_n^2}-\sqrt{w_n^2})(3-2\sqrt{2})=(\sqrt{2(3z_n+2w_n)^2}-\sqrt{(4z_n+3w_n)^2})$. It is enough to prove $2(3z_n+2w_n)^2-(4z_n+3w_n)^2=1$, which is equivalent to $2z_n^2-w_n^2=1$, and this holds due to induction hypothesis. That is, we can set $z_{n+1}=3z_n+2w_n, w_{n+1}=4z_n+3w_n$.
Similarly, we have $(\sqrt{2}-1)^{2n+2}=(\sqrt{x_n^2}-\sqrt{2y_n^2})(3-2\sqrt{2})=\sqrt{(3x_n+4y_n)^2}-\sqrt{2(2x_n+3y_n)^2}$. It is enough to prove $(3x_n+4y_n)^2-2(2x_n+3y_n)^2=1$, which is equivalent to $x_n^2-2y_n^2=1$, and this holds due to induction hypothesis. That is, we can set $x_{n+1}=3x_n+4y_n, y_{n+1}=2x_n+3y_n$. This proves the result.
A: This is related to the problem of finding which triangular numbers are a square, which leads to a Pell equation for $\sqrt 2$, and is related to the units of $\mathbb Z[\sqrt 2]$. Indeed, $(\sqrt2-1)^{-1}=\sqrt2+1$ is the fundamental unit.
The pattern is $(\sqrt2-1)^n = \sqrt{a_n+1} - \sqrt{a_n}$, where the $a_n$-th triangular number is a square. See A001108.
A: Suppose $(\sqrt 2+1)^n=a\sqrt 2+b$ where $a$ and $b$ are integers. Then $(1-\sqrt 2)^n=b-a\sqrt 2$
We now compute $(\sqrt 2 +1)^n(1-\sqrt 2)^n$ in two ways. First, since $(1+\sqrt 2)(1-\sqrt 2)=-1$, the product is $(-1)^n$. Second it is $(b+a\sqrt 2)(b-a\sqrt 2)=b^2-2a^2$ so that $$b^2-2a^2=(-1)^n$$
So $(1-\sqrt 2)^n=\sqrt {b^2}-\sqrt {2a^2}$ and $b^2=2a^2\pm 1$

Technical note: changing the sign to work with $1-\sqrt 2$ removes a factor $(-1)^n$ from some formulae and makes some of the working a bit cleaner. It is easily put back at the end, and doesn't change the observation which motivated the question.

Suppose we have $(\sqrt 2-1)^n=a-b\sqrt 2$ and $a^2=2b^2+1$, then $$(\sqrt 2-1)(a-b\sqrt 2)=(a+b)\sqrt 2 - (a+2b)$$ and $$2(a+b)^2-(a+2b)^2=a^2-2b^2=1$$ So the pattern recurs with a sign change/order change each time.
The pairs $(a,b)$ come out as $$(1,1); (2,3); (5,7); (12,17); (29,41); (70,99); (169,239); (408, 577) \dots$$
Notice that the first term of the next pair is the sum of the elements of the previous pair. The difference between the elements of each pair is the first element of the previous pair.
$$\frac {41}{29} \approx 1.414$$ is a decent approximation to $\sqrt 2$ and later terms are better. The fractions are convergents of the continued fraction for $\sqrt 2$

Note: those pairs reflect the pairs $(2,1); (8,9); (50,49); (288,289) \dots$ which motivated the observation in the first place. You retrieve these by squaring the two numbers and multiplying the first one by $2$.

Suppose we want the positive square root of $x^2-2=0$ with an initial guess $g_1=1$. If we use the Newton-Raphson method $$g_{n+1}=g_n-\frac {g_n^2-2}{2g_n}$$ we get successively $$g_1=\frac 11; g_2=\frac 32; g_3=\frac {17}{12}; g_4=\frac {577}{408} \dots$$
This picks out some of the previous convergent fractions - notable the first, second, fourth and eighth - and this gives a demonstration of the more rapid convergence of this method.

So there is plenty of interesting mathematics going on here - and it is well worth investigating this simple instance to get a feel for some of the connections.
