Looking for a book/proof for Pell's equation $x^2-2y^2=-1\ \Leftrightarrow\ x+y\sqrt{2}=(1+\sqrt{2})^k$ with odd k 
I got this Lemma to Pell's Equation
$$
x^2-2y^2=-1\ \Leftrightarrow\ x+y\sqrt{2}=(1+\sqrt{2})^k\ \text{with k odd}\\ 
x^2-2y^2=+1\ \Leftrightarrow\ x+y\sqrt{2}=(1+\sqrt{2})^k\ \text{with k even}
$$
but without any references and I want to use it in my thesis. 
I found some proofs for the upper equation but nothing to the one below.
Can someone name me a book, that has this lemma inside?
 A: Pell-type numbers are useful in finding Pythagorean triples by leg difference
$$|A-B|=P=p_1^jp_2^kp_3^l\cdots
\quad j,k,l \ge 0
\qquad p_n\in\mathbb{P}\\
\quad P \equiv \pm 1 \pmod 8
 \longrightarrow P\in\big\{1,7,17,23,\cdots\big\}$$
The connection is the variable values needed for  Euclid's formula to produce these $|A-B|$ differences.
$$ \qquad A=m^2-k^2\qquad B=2mk \qquad C=m^2+k^2\qquad \tag{1}$$
In the case of $\space P=p^0=1,\quad
m\in\big\{2, 5, 12, 29, 70, \cdots\big\},\quad 
k\in\big\{\space 1, 2, 5, 12, 29 \cdots\big\}\space$
$$e.g.\space f(2,1)=(3,4,5)
\quad f(5,2)=(21,20,290
\quad f(12,5)=(119,120,169)$$
and these  may be generated directly with the formula below which comes from about the 7th line down from the label "FORMULA" in this link.
\begin{equation}
 m_n= \frac{(1 + \sqrt{2})^{n+1} - (1 - \sqrt{2})^{n+1}}{2\sqrt{2}}\qquad \qquad
 k_n= \frac{(1 + \sqrt{2})^n - (1 - \sqrt{2})^n}{2\sqrt{2}}
\tag {2}
 \end{equation}
These [Pell] numbers can also be generated iteratively using a formula  I developed by "solving" the $A-B\space vs\space B-A$ equations for $(m)$, a formula I later learned to be a Pell-type equation.
\begin{equation}
\quad m=k+\sqrt{2k^2+(-1)^k}. \tag {3}
\end{equation}
Your first equation is similar to $\space (3)\space $
and your second equation is similar to $\space (2)\space$ and it seems
possible that you might be able to link them since they both produce the exact same sequence.
