Prove that sum $(\sqrt2+1)^n+(\sqrt2-1)^n$ is rational for even numbers Let $n \in N$
Prove that $(\sqrt2+1)^n+(\sqrt2-1)^n$ is rational iff $n$ is even
I have tried to do it in induction but got stuck...
Any ideas for how to solve this?
Thanks
 A: Hint: Prove by induction that $(\sqrt2+1)^n=x_n + y_n \sqrt 2$, with $x_n,y_n \in \mathbb Z$, and that $(\sqrt2-1)^n=(-1)^n(x_n-y_n \sqrt 2)$, so that $(\sqrt2+1)^n+(\sqrt2-1)^n=2x_n$ is an integer if $n$ is even.
A: Use the Binomial theorem, which will expand the expression as a polynomial in $\sqrt2$ with integer coefficients.
The terms in $\sqrt2^{n-k}$ and $\sqrt2^{n-k}(-1)^k$ will cancel each other for odd $k$, so that the only powers of $\sqrt2$ that remain have the parity of $n$.
For even $n$, all terms are integer, and for odd $n$ all terms are integers times $\sqrt2$.

For the sake of illustration, showing the half of the expression
$$\begin{align}n=2&\to \sqrt2^2+1=3,\\
n=3&\to\sqrt2^3+3\sqrt2=5\sqrt2,\\
n=4&\to\sqrt2^4+6\sqrt2^2+1=17,\\
n=5&\to\sqrt2^5+10\sqrt2^3+5\sqrt2=29\sqrt2.\end{align}$$
A: Hint. One may recall the binomial expansion formula
$$
(a+b)^n=\sum_{k=0}^n{n \choose k} a^{n-k}b^k
$$ and use it twice, noticing that, for $p=0,1,2,\ldots$,
$$
(\sqrt{2})^{2p} \in \mathbb{N}.
$$
A: The sequence defined by
$$ a_n = (\sqrt{2}+1)^n + (\sqrt{2}-1)^n $$
fulfills:
$$ a_0 = 2,\quad a_1 = 2\sqrt{2},\qquad a_{n+2} = 2\sqrt{2}\, a_{n+1} - a_{n} $$
hence it is straightforward to check by induction that $a_{2k}\in\mathbb{Z}$ and $a_{2k+1}\in\sqrt{2}\,\mathbb{Z}$.
A: Two steps.  Step 1, prove that it is irrational if n is odd.  If n is odd, the left binomial will expand to sqrt(2) ^ n + some other stuff.  The "some other stuff" cannot cancel the sqrt(2) ^ n for n > 3.  So for odd n, you'll have some polynomial expression with a sqrt(2) in it.  The same will be true for the right binomial.  The sqrt()s cannot cancel, because they are added.
Step 2, prove that it is rational if n is even.  If n is 2, the expression expands to 2 + 1 + 2sqrt(2) + 2 + 1 -2sqrt(2) = 6.  Call the binomial on the left A.  A^2 = 3.  A^n, where n is even and > 2, = (A^2)^(n/2).  Same is true for the binomial on the right.  Finishing the proof amounts to simply demonstrating that middle term in the expansion on the left will always be equal to the middle term in the expansion on the right.
